Documentation > Translation > TranslatorManager
Parent du composant : Manager
Version: 1.0.0
Constructor TranslatorManager()
This function creates an instance of TranslatorManager object.
Return
Returns an instance of TranslatorManager object.
TranslatorManager:loadFile(Language, File)
This function stores the translated values of the given file as the given language.
Language
Code of the language (or name of the language)
File
File containing the translations of the given language.
TranslatorManager:getTranslation(Language, Key)
This function returns the translation in the given language of the text defined by the given key.
Language
Language to use for the translation.
Key
Key to retreive the translated text.
TranslatorManager:getFirstLanguage()
This function retreives the first language.
Return
Returns the first language code (defined using the function loadFile).
TranslatorManager:getLanguage()
This function returns the current language code.
Return
Returns the current language code.
TranslatorManager:setLanguage(Language)
This function defines the current language. Must be loaded by the lodFile function.
Language
Language to use for the translation.
Return
Returns true if the language is one of the languages loaded by the lodFile function; otherwise false.
TranslatorManager:getNextLanguage()
This function returns the next language available.
If it was the last language, return the first one.
Return
Returns the next language available.
Me contacter