|
typedef orxBOOL(orxFASTCALL * | orxLOCALE_KEY_FUNCTION) (const orxSTRING _zKey, const orxSTRING _zGroup, void *_pContext) |
Localization module Module that handles localized strings
◆ orxLOCALE_KEY_FUNCTION
typedef orxBOOL(orxFASTCALL * orxLOCALE_KEY_FUNCTION) (const orxSTRING _zKey, const orxSTRING _zGroup, void *_pContext) |
Locale callback function type to use with ForAllKeys
Definition at line 75 of file orxLocale.h.
◆ orxLOCALE_EVENT
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.
◆ orxLocale_Exit()
orxDLLAPI void orxFASTCALL orxLocale_Exit |
( |
| ) |
|
|
extern |
Exits from the Locale Module
◆ orxLocale_ForAllKeys()
Runs a callback for all keys of the current language
- Parameters
-
[in] | _pfnKeyCallback | Function to run for each key. If this function returns orxFALSE, no other keys will be processed (ie. early exit) |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
[in] | _pContext | User defined context, passed to the callback |
- Returns
- orxSTATUS_SUCCESS if a current language is present and all keys were processed without interruption, orxSTATUS_FAILURE otherwise
◆ orxLocale_GetCurrentLanguage()
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetCurrentLanguage |
( |
const orxSTRING | _zGroup | ) |
|
|
extern |
Gets current language
- Parameters
-
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- Current selected language
◆ orxLocale_GetLanguage()
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetLanguage |
( |
orxU32 | _u32LanguageIndex | ) |
|
|
extern |
Gets language at the given index
- Parameters
-
[in] | _u32LanguageIndex | Index of the desired language |
- Returns
- orxSTRING if exist, orxSTRING_EMPTY otherwise
◆ orxLocale_GetLanguageCount()
orxDLLAPI orxU32 orxFASTCALL orxLocale_GetLanguageCount |
( |
| ) |
|
|
extern |
Gets language count
- Returns
- Number of languages defined
◆ orxLocale_GetString()
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetString |
( |
const orxSTRING | _zKey, |
|
|
const orxSTRING | _zGroup ) |
|
extern |
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
◆ orxLocale_HasLanguage()
orxDLLAPI orxBOOL orxFASTCALL orxLocale_HasLanguage |
( |
const orxSTRING | _zLanguage | ) |
|
|
extern |
Has given language? (if not correctly defined, false will be returned)
- Parameters
-
[in] | _zLanguage | Concerned language |
- Returns
- orxTRUE / orxFALSE
◆ orxLocale_HasString()
orxDLLAPI orxBOOL orxFASTCALL orxLocale_HasString |
( |
const orxSTRING | _zKey, |
|
|
const orxSTRING | _zGroup ) |
|
extern |
Has string for the given key?
- Parameters
-
[in] | _zKey | Key name |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
- Returns
- orxTRUE / orxFALSE
◆ orxLocale_Init()
Initializes the Locale Module
- Returns
- orxSTATUS_SUCCESS / orxSTATUS_FAILURE
◆ orxLocale_SelectLanguage()
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_SelectLanguage |
( |
const orxSTRING | _zLanguage, |
|
|
const orxSTRING | _zGroup ) |
|
extern |
Selects current working language
- Parameters
-
[in] | _zLanguage | Language to select |
[in] | _zGroup | Concerned group, orxNULL for default/fallback one |
◆ orxLocale_SetString()
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_SetString |
( |
const orxSTRING | _zKey, |
|
|
const orxSTRING | _zValue, |
|
|
const orxSTRING | _zGroup ) |
|
extern |
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
◆ orxLocale_Setup()
orxDLLAPI void orxFASTCALL orxLocale_Setup |
( |
| ) |
|
|
extern |