#include <localemgr.h>
Public Member Functions | |
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". | |
virtual std::list< std::string > | getAvailableLocales () |
Get the list of available locales. | |
virtual const char * | translate (const char *text, const char *localeName=0) |
Returns translated text. | |
virtual const char * | getDefaultLocaleName () |
Get the default locale name. | |
virtual void | setDefaultLocaleName (const char *name) |
Set the new standard locale of Sword. | |
virtual void | loadConfigDir (const char *ipath) |
Augment this localmgr with all locale.conf files in a directory. | |
Static Public Attributes | |
LocaleMgr | systemLocaleMgr |
The LocaleMgr object used globally in the Sword world. | |
Protected Attributes | |
LocaleMap | locales |
Private Member Functions | |
void | deleteLocales () |
LocaleMgr (const LocaleMgr &) | |
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
setDefaultLocaleName To get the locale for a language name use
getLocale To get a list of availble locales use
|
Get the list of available locales.
|
|
Get the default locale name. To set it use
|
|
Get the locale connected with the name "name".
|
|
Set the new standard locale of Sword.
|
|
Returns translated text. This function uses both parameters to return the translated version of the given text.
|
|
The LocaleMgr object used globally in the Sword world. Do not create your own LocaleMgr, use this static object instead. |