PixelLightAPI
.
|
Localization manager. More...
#include <Localization.h>
Public Member Functions | |
String | GetLanguage () const |
Returns the current language. | |
void | SetLanguage (const String &sLanguage) |
Sets the current language. | |
PLCORE_API String | Get (const String &sText, const String &sGroup=PixelLight) const |
Returns the translation of the given text. | |
uint32 | GetNumOfGroups () const |
Returns the number of groups. | |
LocalizationGroup * | GetGroup (uint32 nIndex) const |
Returns a group by index. | |
LocalizationGroup * | GetGroup (const String &sName) const |
Returns a group by name. | |
PLCORE_API LocalizationGroup * | AddGroup (const String &sName) |
Adds a new group. | |
PLCORE_API bool | RemoveGroup (uint32 nIndex) |
Removes a group by index. | |
PLCORE_API bool | RemoveGroup (const String &sName) |
Removes a group by name. | |
PLCORE_API void | RemoveAllGroups () |
Removes all groups. | |
Static Public Member Functions | |
static PLCORE_API Localization * | GetInstance () |
static PLCORE_API bool | HasInstance () |
Static Public Attributes | |
static PLCORE_API const String | PixelLight |
Localization manager.
* Usage example: * String sString = PLT("Translate this text"); * String sMyString = PL_TEXT("Translate this text", "MyProject"); *
static PLCORE_API Localization* PLCore::Localization::GetInstance | ( | ) | [static] |
static PLCORE_API bool PLCore::Localization::HasInstance | ( | ) | [static] |
String PLCore::Localization::GetLanguage | ( | ) | const [inline] |
Returns the current language.
void PLCore::Localization::SetLanguage | ( | const String & | sLanguage | ) | [inline] |
Sets the current language.
[in] | sLanguage | The new current language |
PLCORE_API String PLCore::Localization::Get | ( | const String & | sText, |
const String & | sGroup = PixelLight |
||
) | const |
Returns the translation of the given text.
[in] | sText | Text to translate |
[in] | sGroup | Group the text to translate is in |
uint32 PLCore::Localization::GetNumOfGroups | ( | ) | const [inline] |
Returns the number of groups.
LocalizationGroup * PLCore::Localization::GetGroup | ( | uint32 | nIndex | ) | const [inline] |
Returns a group by index.
[in] | nIndex | Index of the group |
LocalizationGroup * PLCore::Localization::GetGroup | ( | const String & | sName | ) | const [inline] |
Returns a group by name.
[in] | sName | Name of the group |
PLCORE_API LocalizationGroup* PLCore::Localization::AddGroup | ( | const String & | sName | ) |
Adds a new group.
[in] | sName | Name of the new group |
PLCORE_API bool PLCore::Localization::RemoveGroup | ( | uint32 | nIndex | ) |
Removes a group by index.
[in] | nIndex | Index of the group |
PLCORE_API bool PLCore::Localization::RemoveGroup | ( | const String & | sName | ) |
Removes a group by name.
[in] | sName | Name of the group |
PLCORE_API void PLCore::Localization::RemoveAllGroups | ( | ) |
Removes all groups.
PLCORE_API const String PLCore::Localization::PixelLight [static] |
"PixelLight" (default)
|