orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
OrxLocale

Data Structures

struct  orxLOCALE_EVENT_PAYLOAD

Typedefs

typedef orxBOOL(orxFASTCALL * orxLOCALE_KEY_FUNCTION) (const orxSTRING _zKey, const orxSTRING _zGroup, void *_pContext)

Enumerations

enum  orxLOCALE_EVENT { orxLOCALE_EVENT_SELECT_LANGUAGE = 0 , orxLOCALE_EVENT_SET_STRING , orxLOCALE_EVENT_NUMBER , orxLOCALE_EVENT_NONE = orxENUM_NONE }

Functions

orxDLLAPI void orxFASTCALL orxLocale_Exit ()
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_ForAllKeys (const orxLOCALE_KEY_FUNCTION _pfnKeyCallback, const orxSTRING _zGroup, void *_pContext)
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetCurrentLanguage (const orxSTRING _zGroup)
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetLanguage (orxU32 _u32LanguageIndex)
orxDLLAPI orxU32 orxFASTCALL orxLocale_GetLanguageCount ()
orxDLLAPI const orxSTRING orxFASTCALL orxLocale_GetString (const orxSTRING _zKey, const orxSTRING _zGroup)
orxDLLAPI orxBOOL orxFASTCALL orxLocale_HasLanguage (const orxSTRING _zLanguage)
orxDLLAPI orxBOOL orxFASTCALL orxLocale_HasString (const orxSTRING _zKey, const orxSTRING _zGroup)
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_Init ()
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_SelectLanguage (const orxSTRING _zLanguage, const orxSTRING _zGroup)
orxDLLAPI orxSTATUS orxFASTCALL orxLocale_SetString (const orxSTRING _zKey, const orxSTRING _zValue, const orxSTRING _zGroup)
orxDLLAPI void orxFASTCALL orxLocale_Setup ()

Detailed Description

Localization module Module that handles localized strings

Typedef Documentation

◆ 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.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ orxLocale_Exit()

orxDLLAPI void orxFASTCALL orxLocale_Exit ( )
extern

Exits from the Locale Module

◆ orxLocale_ForAllKeys()

orxDLLAPI orxSTATUS orxFASTCALL orxLocale_ForAllKeys ( const orxLOCALE_KEY_FUNCTION _pfnKeyCallback,
const orxSTRING _zGroup,
void * _pContext )
extern

Runs a callback for all keys of the current language

Parameters
[in]_pfnKeyCallbackFunction to run for each key. If this function returns orxFALSE, no other keys will be processed (ie. early exit)
[in]_zGroupConcerned group, orxNULL for default/fallback one
[in]_pContextUser 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]_zGroupConcerned 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]_u32LanguageIndexIndex 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]_zKeyKey name
[in]_zGroupConcerned 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]_zLanguageConcerned 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]_zKeyKey name
[in]_zGroupConcerned group, orxNULL for default/fallback one
Returns
orxTRUE / orxFALSE

◆ orxLocale_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxLocale_Init ( )
extern

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]_zLanguageLanguage to select
[in]_zGroupConcerned 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]_zKeyKey name
[in]_zValueValue
[in]_zGroupConcerned group, orxNULL for default/fallback one
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxLocale_Setup()

orxDLLAPI void orxFASTCALL orxLocale_Setup ( )
extern

Locale module setup


Generated for orx by doxygen 1.8.11