function TranslationInterface::translateString

Same name in other branches
  1. 9 core/lib/Drupal/Core/StringTranslation/TranslationInterface.php \Drupal\Core\StringTranslation\TranslationInterface::translateString()
  2. 8.9.x core/lib/Drupal/Core/StringTranslation/TranslationInterface.php \Drupal\Core\StringTranslation\TranslationInterface::translateString()
  3. 10 core/lib/Drupal/Core/StringTranslation/TranslationInterface.php \Drupal\Core\StringTranslation\TranslationInterface::translateString()

Translates a TranslatableMarkup object to a string.

Parameters

\Drupal\Core\StringTranslation\TranslatableMarkup $translated_string: A TranslatableMarkup object.

Return value

string The translated string.

2 methods override TranslationInterface::translateString()
TestTranslationManager::translateString in core/modules/user/tests/src/Unit/PermissionHandlerTest.php
Translates a TranslatableMarkup object to a string.
TranslationManager::translateString in core/lib/Drupal/Core/StringTranslation/TranslationManager.php
Translates a TranslatableMarkup object to a string.

File

core/lib/Drupal/Core/StringTranslation/TranslationInterface.php, line 59

Class

TranslationInterface
Interface for the translation.manager translation service.

Namespace

Drupal\Core\StringTranslation

Code

public function translateString(TranslatableMarkup $translated_string);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.