Interface to the Localization Manager. More...
#include
Public Types | |
enum | EPlatformIndependentLanguageID { ePILID_Japanese, ePILID_English, ePILID_French, ePILID_Spanish, ePILID_German, ePILID_Italian, ePILID_Dutch, ePILID_Portuguese, ePILID_Russian, ePILID_Korean, ePILID_ChineseT, ePILID_ChineseS, ePILID_Finnish, ePILID_Swedish, ePILID_Danish, ePILID_Norwegian, ePILID_Polish, ePILID_Arabic, ePILID_Czech, ePILID_Turkish, ePILID_MAX_OR_INVALID } |
typedef uint32 | TLocalizationBitfield |
Public Member Functions | |
virtual const char * | LangNameFromPILID (const ILocalizationManager::EPlatformIndependentLanguageID id)=0 |
virtual ILocalizationManager::TLocalizationBitfield | MaskSystemLanguagesFromSupportedLocalizations (const ILocalizationManager::TLocalizationBitfield systemLanguages)=0 |
virtual ILocalizationManager::TLocalizationBitfield | IsLanguageSupported (const ILocalizationManager::EPlatformIndependentLanguageID id)=0 |
virtual bool | SetLanguage (const char *sLanguage)=0 |
virtual const char * | GetLanguage ()=0 |
virtual bool | InitLocalizationData (const char *sFileName, bool bReload=false)=0 |
Load the descriptor file with tag information. | |
virtual bool | RequestLoadLocalizationDataByTag (const char *sTag)=0 |
Request to load loca data by tag. Actual loading will happen during next level load begin event. | |
virtual bool | LoadLocalizationDataByTag (const char *sTag, bool bReload=false)=0 |
Direct load of loca data by tag. | |
virtual bool | ReleaseLocalizationDataByTag (const char *sTag)=0 |
virtual void | RegisterPostProcessor (ILocalizationPostProcessor *pPostProcessor)=0 |
virtual void | UnregisterPostProcessor (ILocalizationPostProcessor *pPostProcessor)=0 |
virtual bool | LoadExcelXmlSpreadsheet (const char *sFileName, bool bReload=false)=0 |
virtual void | ReloadData ()=0 |
virtual void | FreeData ()=0 |
Free localization data. | |
virtual bool | LocalizeString (const char *sString, string &outLocalizedString, bool bEnglish=false)=0 |
virtual bool | LocalizeString (const string &sString, string &outLocalizedString, bool bEnglish=false)=0 |
Same as LocalizeString( const char* sString, string& outLocalizedString, bool bEnglish=false ) but at the moment this is faster. | |
virtual bool | LocalizeLabel (const char *sLabel, string &outLocalizedString, bool bEnglish=false)=0 |
virtual bool | GetLocalizedInfoByKey (const char *sKey, SLocalizedInfoGame &outGameInfo)=0 |
virtual bool | GetLocalizedInfoByKey (const char *sKey, SLocalizedSoundInfoGame *pOutSoundInfo)=0 |
virtual int | GetLocalizedStringCount ()=0 |
Return number of localization entries. | |
virtual bool | GetLocalizedInfoByIndex (int nIndex, SLocalizedInfoEditor &outEditorInfo)=0 |
virtual bool | GetLocalizedInfoByIndex (int nIndex, SLocalizedInfoGame &outGameInfo)=0 |
virtual bool | GetEnglishString (const char *sKey, string &sLocalizedString)=0 |
virtual bool | GetSubtitle (const char *sKeyOrLabel, string &outSubtitle, bool bForceSubtitle=false)=0 |
virtual void | FormatStringMessage (string &outString, const string &sString, const char **sParams, int nParams)=0 |
virtual void | FormatStringMessage (string &outString, const string &sString, const char *param1, const char *param2=0, const char *param3=0, const char *param4=0)=0 |
virtual void | LocalizeTime (time_t t, bool bMakeLocalTime, bool bShowSeconds, string &outTimeString)=0 |
virtual void | LocalizeDate (time_t t, bool bMakeLocalTime, bool bShort, bool bIncludeWeekday, string &outDateString)=0 |
virtual void | LocalizeDuration (int seconds, string &outDurationString)=0 |
virtual void | LocalizeNumber (int number, string &outNumberString)=0 |
virtual void | LocalizeNumber (float number, int decimals, string &outNumberString)=0 |
Static Public Member Functions | |
static ILINE TLocalizationBitfield | LocalizationBitfieldFromPILID (EPlatformIndependentLanguageID pilid) |
Interface to the Localization Manager.
Platform independent language IDs. Used to map the platform specific language codes to localization pakfiles. Please ensure that each entry in this enum has a corresponding entry in the PLATFORM_INDEPENDENT_LANGUAGE_NAMES array which is defined in LocalizedStringManager.cpp currently.
These methods format outString depending on sString with ordered arguments. FormatStringMessage(outString, "This is %2 and this is %1", "second", "first");
[out] | outString | This is first and this is second. |
|
pure virtual |
Get the english localization info structure corresponding to a key.
[in] | sKey | Key to be looked up. Key = Label without '@' sign. |
[out] | sLocalizedString | Corresponding english language string. |
|
pure virtual |
Get the localization info structure at index nIndex.
[in] | nIndex | Index. |
[out] | outEditorInfo | Reference to localization info structure to be filled in. |
|
pure virtual |
Get the localization info structure at index nIndex.
[in] | nIndex | Index. |
[out] | outGameInfo | Reference to localization info structure to be filled in. |
|
pure virtual |
Get localization info structure corresponding to a key (key=label without the '@' sign).
[in] | sKey | Key to be looked up. Key = Label without '@' sign. |
[out] | outGameInfo | Reference to localization info structure to be filled in. |
|
pure virtual |
Get the sound localization info structure corresponding to a key.
[in] | sKey | Key to be looked up. Key = Label without '@' sign. |
[out] | outSoundInfo | Reference to sound info structure to be filled in. outSoundInfo.pSoundMoods requires nNumSoundMoods-times allocated memory. On return outSoundInfo.nNumSoundMoods will hold how many SoundsMood entries are needed. On return outSoundInfo.nNumEventParameters will hold how many EventParameter entries are needed. outSoundInfo.pEventParameters requires nNumEventParameters-times allocated memory. Passing 0 in either the Num fields will make the query ignore checking for allocated memory. |
|
pure virtual |
Get Subtitle for Key or Label.
[in] | sKeyOrLabel | Key or Label to be used for subtitle lookup. Key = Label without '@' sign. |
[out] | outSubtitle | Subtitle (untouched if Key/Label not found). |
[in] | bForceSubtitle | If true, get subtitle (sLocalized or sEnglish) even if not specified in Data file. |
|
pure virtual |
Provides the localized version corresponding to a label. A label has to start with '@' sign.
[in] | sLabel | Label to be translated, must start with '@' sign. |
[out] |
|
pure virtual |
Translate a string into the currently selected language. Processes the input string and translates all labels contained into the currently selected language.
[in] | sString | String to be translated. |
[out] | outLocalizedString | Translated version of the string. |
[in] | bEnglish | If true, translates the string into the always present English language. |