Elgg  Version 3.0
Public Member Functions | List of all members
Elgg\I18n\NullTranslator Class Reference

WARNING: API IN FLUX. More...

Inheritance diagram for Elgg\I18n\NullTranslator:
Elgg\I18n\Translator

Public Member Functions

 translate ($key, $args=[], $lang= '')
 
- Public Member Functions inherited from Elgg\I18n\Translator
 __construct (Config $config, LocaleService $localService)
 Constructor. More...
 
 getLoadedTranslations ()
 Get a map of all loaded translations. More...
 
 translate ($message_key, array $args=[], $language="")
 Given a message key, returns an appropriately translated full-text string. More...
 
 addTranslation ($country_code, $language_array, $ensure_translations_loaded=true)
 Add a translation. More...
 
 getCurrentLanguage ()
 Get the current system/user language or "en". More...
 
 setCurrentLanguage ($language=null)
 Sets current system language. More...
 
 detectLanguage ()
 Detect the current system/user language or false. More...
 
 bootTranslations ()
 Ensures all needed translations are loaded. More...
 
 loadTranslations ($language)
 Load both core and plugin translations. More...
 
 registerTranslations ($path, $load_all=false, $language=null)
 When given a full path, finds translation files and loads them. More...
 
 reloadAllTranslations ()
 Reload all translations from all registered paths. More...
 
 getInstalledTranslations ($calculate_completeness=false)
 Return an array of installed translations as an associative array "two letter code" => "native language name". More...
 
 getLanguageCompleteness ($language)
 Return the level of completeness for a given language code (compared to english) More...
 
 getMissingLanguageKeys ($language)
 Return the translation keys missing from a given language, or those that are identical to the english version. More...
 
 languageKeyExists ($key, $language= 'en')
 Check if a given language key exists. More...
 
 getAvailableLanguages ()
 Returns an array of all available language keys. More...
 
 registerLanguagePath ($path)
 Registers a path for potential translation files. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Elgg\I18n\Translator
static getAllLanguageCodes ()
 Returns an array of language codes. More...
 
static normalizeLanguageCode ($code)
 Normalize a language code (e.g. More...
 
- Protected Member Functions inherited from Elgg\I18n\Translator
 includeLanguageFile ($path)
 Load cached or include a language file by its path. More...
 
 getLanguagePaths ()
 Returns a unique array with locations of translation files. More...
 

Detailed Description

WARNING: API IN FLUX.

DO NOT USE DIRECTLY.

A translator that does nothing except return the key that was requested.

This translator is useful during development if you want to be able to easily tell what the available keys are for changing the wording of UI elements.

Since
1.10.0

Definition at line 16 of file NullTranslator.php.

Member Function Documentation

Elgg\I18n\NullTranslator::translate (   $key,
  $args = [],
  $lang = '' 
)

Definition at line 21 of file NullTranslator.php.


The documentation for this class was generated from the following file: