The SWORD Project
1.9.0.svnversion
|
#include <localemgr.h>
Public Member Functions | |
virtual StringList | getAvailableLocales () |
virtual const char * | getDefaultLocaleName () |
virtual SWLocale * | getLocale (const char *name) |
virtual void | loadConfigDir (const char *ipath) |
LocaleMgr (const char *iConfigPath=0) | |
virtual void | setDefaultLocaleName (const char *name) |
virtual const char * | translate (const char *text, const char *localeName=0) |
virtual | ~LocaleMgr () |
Static Public Member Functions | |
static LocaleMgr * | getSystemLocaleMgr () |
static void | setSystemLocaleMgr (LocaleMgr *newLocaleMgr) |
Protected Attributes | |
LocaleMap * | locales |
Static Protected Attributes | |
static LocaleMgr * | systemLocaleMgr = 0 |
Private Member Functions | |
void | deleteLocales () |
LocaleMgr (const LocaleMgr &) | |
Private Attributes | |
char * | defaultLocaleName |
Friends | |
class | __staticsystemLocaleMgr |
The LocaleMgr class handles all the different locales of SWORD. 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 50 of file localemgr.h.
LocaleMgr::LocaleMgr | ( | const char * | iConfigPath = 0 | ) |
Default constructor of LocaleMgr You do not normally need this constructor; use LocaleMgr::getSystemLocaleMgr() instead.
Definition at line 72 of file localemgr.cpp.
|
virtual |
|
private |
Definition at line 199 of file localemgr.cpp.
|
virtual |
Get the list of available locales.
Definition at line 222 of file localemgr.cpp.
|
virtual |
Get the default locale name. To set it use
Definition at line 246 of file localemgr.cpp.
Get a locale object by name
name | The name of the locale you want to have. For example use getLocale("de") to get the locale for the German language. |
Definition at line 210 of file localemgr.cpp.
|
static |
The LocaleMgr object used globally in the SWORD world. Do not create your own LocaleMgr, use this static object instead.
Definition at line 54 of file localemgr.cpp.
|
virtual |
Augment this LocalMgr object with all locale.conf files in a directory
Definition at line 158 of file localemgr.cpp.
|
virtual |
Set the new standard locale of SWORD.
name | The name of the new default locale |
Definition at line 251 of file localemgr.cpp.
|
static |
Definition at line 63 of file localemgr.cpp.
Returns translated text. This function uses both parameters to return the translated version of the given text.
text | The text to translate into the language given by the first parameter. |
localeName | The name of the locale SWORD should use |
Definition at line 234 of file localemgr.cpp.
|
friend |
Definition at line 56 of file localemgr.h.
|
private |
Definition at line 54 of file localemgr.h.
|
protected |
Definition at line 59 of file localemgr.h.
|
staticprotected |
Definition at line 60 of file localemgr.h.