#include <localemgr.h>
Public Methods | |
LocaleMgr (const char *iConfigPath = 0) | |
Default constructor of LocaleMgr You do normally not need this constructor, use LocaleMgr::systemLocaleMgr instead. | |
virtual | ~LocaleMgr () |
Default destructor of LocaleMgr. | |
virtual SWLocale* | getLocale (const char *name) |
Get the locale connected with the name "name". More... | |
virtual list< string > | getAvailableLocales () |
Get the list of available locales. More... | |
virtual const char* | translate (const char *name, const char *text) |
Returns translated text. More... | |
virtual const char* | getDefaultLocaleName () |
Get the default locale name. More... | |
virtual void | setDefaultLocaleName (const char *name) |
Set the new standard locale of Sword. More... | |
Static Public Attributes | |
LocaleMgr | systemLocaleMgr |
The LocaleMgr object used globally in the Sword world. More... | |
Protected Methods | |
virtual void | loadConfigDir (const char *ipath) |
Protected Attributes | |
LocaleMap | locales |
Private Methods | |
void | deleteLocales () |
Private Attributes | |
char* | defaultLocaleName |
It provides functions to get a list of all available locales, to get the default locale name and to get it. The other functions are not interesting for frontend programmers.
To get the default locale name use
Definition at line 49 of file localemgr.h.
|
Get the list of available locales.
@ret Returns a list of strings, which contains the names of the available locales.
|
Get the default locale name.
To set it use
|
Get the locale connected with the name "name".
name | The name of the locale you want to have. For example use getLocale("de") to get the locale for the German language. |
|
Set the new standard locale of Sword.
name | The name of the new default locale |
|
Returns translated text.
This function uses both parameters to return the translated version of the given text.
name | The name of the locale Sword should use @paran The text to translate into the language given by the first parameter. |
|
The LocaleMgr object used globally in the Sword world.
Do not create your own LocaleMgr, use this static object instead.
Definition at line 107 of file localemgr.h.