3 namespace Drupal\Core\StringTranslation\Translator;
6 * Interface for objects capable of string translation.
8 interface TranslatorInterface {
11 * Retrieves English string to given language.
13 * @param string $langcode
14 * Language code to translate to.
15 * @param string $string
17 * @param string $context
20 * @return string|false
21 * Translated string if there is a translation, FALSE if not.
23 public function getStringTranslation($langcode, $string, $context);
26 * Resets translation cache.
28 * Since most translation systems implement some form of caching, this
29 * provides a way to delete that cache.
31 public function reset();