"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php" (26 Nov 2020, 759 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "TranslatorInterface.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 
    3 namespace Drupal\Core\StringTranslation\Translator;
    4 
    5 /**
    6  * Interface for objects capable of string translation.
    7  */
    8 interface TranslatorInterface {
    9 
   10   /**
   11    * Retrieves English string to given language.
   12    *
   13    * @param string $langcode
   14    *   Language code to translate to.
   15    * @param string $string
   16    *   The source string.
   17    * @param string $context
   18    *   The string context.
   19    *
   20    * @return string|false
   21    *   Translated string if there is a translation, FALSE if not.
   22    */
   23   public function getStringTranslation($langcode, $string, $context);
   24 
   25   /**
   26    * Resets translation cache.
   27    *
   28    * Since most translation systems implement some form of caching, this
   29    * provides a way to delete that cache.
   30    */
   31   public function reset();
   32 
   33 }