Localization module Module that handles localized strings
Event enum
Enumerator |
---|
orxLOCALE_EVENT_SELECT_LANGUAGE |
Event sent when selecting a language
|
orxLOCALE_EVENT_SET_STRING |
Event sent when setting a string
|
orxLOCALE_EVENT_NUMBER |
|
orxLOCALE_EVENT_NONE |
|
Definition at line 52 of file orxLocale.h.
Exits from the Locale Module
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetCurrentLanguage |
( |
const orxSTRING |
_zGroup | ) |
|
Gets current language
- Parameters
-
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- Current selected language
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetKey |
( |
orxU32 |
_u32KeyIndex, |
|
|
const orxSTRING |
_zGroup |
|
) |
| |
Gets key for the current language at the given index
- Parameters
-
[in] | _u32KeyIndex | Index of the desired key |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- orxSTRING if exist, orxNULL otherwise
orxDLLAPI orxU32 orxFASTCALL orxLocale_GetKeyCount |
( |
const orxSTRING |
_zGroup | ) |
|
Gets key count for the current language
- Parameters
-
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- Key count the current language if valid, 0 otherwise
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetLanguage |
( |
orxU32 |
_u32LanguageIndex | ) |
|
Gets language at the given index
- Parameters
-
[in] | _u32LanguageIndex | Index of the desired language |
- Returns
- orxSTRING if exist, orxSTRING_EMPTY otherwise
orxDLLAPI orxU32 orxFASTCALL orxLocale_GetLanguageCount |
( |
| ) |
|
Gets language count
- Returns
- Number of languages defined
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetString |
( |
const orxSTRING |
_zKey, |
|
|
const orxSTRING |
_zGroup |
|
) |
| |
Reads a string in the current language for the given key
- Parameters
-
[in] | _zKey | Key name |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- The value
orxDLLAPI orxBOOL orxFASTCALL orxLocale_HasLanguage |
( |
const orxSTRING |
_zLanguage | ) |
|
Has given language? (if not correctly defined, false will be returned)
- Parameters
-
[in] | _zLanguage | Concerned language |
- Returns
- orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxLocale_HasString |
( |
const orxSTRING |
_zKey, |
|
|
const orxSTRING |
_zGroup |
|
) |
| |
Has string for the given key?
- Parameters
-
[in] | _zKey | Key name |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- orxTRUE / orxFALSE
Initializes the Locale Module
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_SelectLanguage |
( |
const orxSTRING |
_zLanguage, |
|
|
const orxSTRING |
_zGroup |
|
) |
| |
Selects current working language
- Parameters
-
[in] | _zLanguage | Language to select |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_SetString |
( |
const orxSTRING |
_zKey, |
|
|
const orxSTRING |
_zValue, |
|
|
const orxSTRING |
_zGroup |
|
) |
| |
Writes a string in the current language for the given key
- Parameters
-
[in] | _zKey | Key name |
[in] | _zValue | Value |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE