namespace: ewol::translate
Description:
This is a simple interface to converte application display string in a generic current system language
Synopsis:
void addPath (const std::string & _lib,
const std::string & _path,
bool _major);
const std::string & getPaths (const std::string & _lib);
void setLanguageDefault (const std::string & _lang);
const std::string & getLanguageDefault ();
void setLanguage (const std::string & _lang);
const std::string & getLanguage ();
void autoDetectLanguage ();
const std::string & get (const std::string & _instance);
Detail:
addPath
void addPath (const std::string & _lib,
const std::string & _path,
bool _major);
Set the path folder of the translation files
Parameter [input]: | _lib | Library name that the path depend |
Parameter [input]: | _path | ETK generic path (DATA:... or /xxx) |
Parameter [input]: | _major | This path is the major path (The last loaded, the one wichi overload all) |
getPaths
const std::string & getPaths (const std::string & _lib);
Get the current paths of the library
setLanguageDefault
void setLanguageDefault (const std::string & _lang);
Set the default language to load data (the default language might contain all internal data for the basic application)
getLanguageDefault
const std::string & getLanguageDefault ();
Get the current language selected
Return: | | The 2/3 char defining the language |
setLanguage
void setLanguage (const std::string & _lang);
Set the language to load data. when no data availlable, we get the default language.
getLanguage
const std::string & getLanguage ();
Get the current language loaded
Return: | | The 2/3 char defining the language |
autoDetectLanguage
void autoDetectLanguage ();
Automatic detection of the system language
get
const std::string & get (const std::string & _instance);
Translate a specific text (if not find, it will be retured the same text).
Parameter [input]: | _instance | Text to translate. |
Return: | | The tranlated text. |