LanguageTranslator::addFileToTranslate() LanguageTranslator::addFileToTranslate(string $filename) LanguageTranslator::addFileToTranslate(string $filename, bool $filenameIsTextdomain = false, bool $save = true) | string bool | Given a source file to translate, create a new textdomain | |
LanguageTranslator::commonTranslation() LanguageTranslator::commonTranslation(string $str) LanguageTranslator::commonTranslation(string $str) | string | Get a common translation | |
LanguageTranslator::encodeJSON() LanguageTranslator::encodeJSON($value) LanguageTranslator::encodeJSON($value) | string | JSON encode language translation data | |
LanguageTranslator::filenameToTextdomain() LanguageTranslator::filenameToTextdomain(string $filename) LanguageTranslator::filenameToTextdomain(string $filename) | string | Given a filename, convert it to a textdomain string | |
LanguageTranslator::findTranslation() LanguageTranslator::findTranslation(string $text) LanguageTranslator::findTranslation(string $text, $context = '', array $options = []) | string array | Find a translation for given text | |
LanguageTranslator::findTranslations() LanguageTranslator::findTranslations(string $text) LanguageTranslator::findTranslations(string $text, $context = '', array $options = []) | array | Find all translation(s) for given text | |
LanguageTranslator::getTextdomain() LanguageTranslator::getTextdomain(string $textdomain) LanguageTranslator::getTextdomain(string $textdomain) | array | Return the data available for the given $textdomain string | |
LanguageTranslator::getTranslation() LanguageTranslator::getTranslation($textdomain, string $text) LanguageTranslator::getTranslation($textdomain, string $text, string $context = '', array $options = []) | string array false | Implementation for the getTranslation() function - you should call getTranslation() without underscores instead. | |
LanguageTranslator::getTranslationInfo() LanguageTranslator::getTranslationInfo($textdomain, string $text) LanguageTranslator::getTranslationInfo($textdomain, string $text, string $context = '', array $options = []) | array | Get verbose array of information about translation | |
LanguageTranslator::getTranslationOrFalse() LanguageTranslator::getTranslationOrFalse($textdomain, string $text) LanguageTranslator::getTranslationOrFalse($textdomain, string $text, string $context = '', array $options = []) | string false | Get translated text or boolean false if not translated (rather than default language value) | |
LanguageTranslator::getTranslations() LanguageTranslator::getTranslations($textdomain) LanguageTranslator::getTranslations($textdomain) | array | Return ALL translations for the given textdomain | |
LanguageTranslator::loadTextdomain() LanguageTranslator::loadTextdomain(string $textdomain) LanguageTranslator::loadTextdomain(string $textdomain) | $this | Load translation group $textdomain into the current language translations | |
LanguageTranslator::removeTranslation() LanguageTranslator::removeTranslation(string $textdomain, string $hash) LanguageTranslator::removeTranslation(string $textdomain, string $hash) | $this | Remove a translation | |
LanguageTranslator::saveTextdomain() LanguageTranslator::saveTextdomain(string $textdomain) LanguageTranslator::saveTextdomain(string $textdomain) | int bool | Save the translation group given by $textdomain to disk in its translation file | |
LanguageTranslator::setCurrentLanguage() LanguageTranslator::setCurrentLanguage(Language $language) LanguageTranslator::setCurrentLanguage(Language $language) | $this | Set the current language and reset current stored textdomains | |
LanguageTranslator::setTranslation() LanguageTranslator::setTranslation(string $textdomain, string $text, string $translation) LanguageTranslator::setTranslation(string $textdomain, string $text, string $translation, string $context = '') | string | Set a translation | |
LanguageTranslator::setTranslationFromHash() LanguageTranslator::setTranslationFromHash(string $textdomain, string $hash, string $translation) LanguageTranslator::setTranslationFromHash(string $textdomain, string $hash, string $translation) | string | Set a translation using an already known hash | |
LanguageTranslator::textdomainFileExists() LanguageTranslator::textdomainFileExists(string $textdomain) LanguageTranslator::textdomainFileExists(string $textdomain) | bool | Does a json translation file exist for the given textdomain? | |
LanguageTranslator::textdomainString() LanguageTranslator::textdomainString($textdomain) LanguageTranslator::textdomainString($textdomain) | string | Normalize a string, filename or object to be a textdomain string | |
LanguageTranslator::textdomainToFilename() LanguageTranslator::textdomainToFilename(string $textdomain) LanguageTranslator::textdomainToFilename(string $textdomain) | string | Given a textdomain string, convert it to a filename (relative to site root) | |
LanguageTranslator::unloadTextdomain() LanguageTranslator::unloadTextdomain(string $textdomain) LanguageTranslator::unloadTextdomain(string $textdomain) | (nothing) | Unload the given textdomain string from memory | |