ILocalizationManager

Interface to the Localization Manager.

C++
struct ILocalizationManager {
  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
  };
};
File

ILocalizationManager.h

ILocalizationManager::EPlatformIndependentLanguageID Enumeration
C++
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
};
File

ILocalizationManager.h

Members
Members
Description
ePILID_ChineseT
Traditional Chinese
ePILID_ChineseS
Simplified Chinese
ePILID_Arabic
Test value for PS3. Not currently supported by Sony on the PS3 as a system language
ePILID_MAX_OR_INVALID
Not a language, denotes the maximum number of languages or an unknown language
Description

Platform independent language IDs. These are used to map the platform specific language codes on the PS3 and 360 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.

ILocalizationManager::~ILocalizationManager Destructor
C++
ILocalizationManager::FormatStringMessage Method (string&, string&, char*, char*, char*, char*)
C++
virtual void FormatStringMessage(string& outString, const string& sString, const char* param1, const char* param2 = 0, const char* param3 = 0, const char* param4 = 0) = 0;
ILocalizationManager::FormatStringMessage Method (string&, string&, char**, int)
C++
virtual void FormatStringMessage(string& outString, const string& sString, const char** sParams, int nParams) = 0;
Parameters
Parameters
Description
string& outString
This is first and this is second.
Description

These methods format outString depending on sString with ordered arguments FormatStringMessage(outString, "This is %2 and this is %1", "second", "first");

ILocalizationManager::FormatStringMessage Method (wstring&, wstring&, wchar_t*, wchar_t*, wchar_t*, wchar_t*)
C++
virtual void FormatStringMessage(wstring& outString, const wstring& sString, const wchar_t* param1, const wchar_t* param2 = 0, const wchar_t* param3 = 0, const wchar_t* param4 = 0) = 0;
ILocalizationManager::FormatStringMessage Method (wstring&, wstring&, wchar_t**, int)
C++
virtual void FormatStringMessage(wstring& outString, const wstring& sString, const wchar_t** sParams, int nParams) = 0;
ILocalizationManager::FreeData Method

Free localization data.

C++
virtual void FreeData() = 0;
ILocalizationManager::GetEnglishString Method

Get the english localization info structure corresponding to a key.

C++
virtual bool GetEnglishString(const char * sKey, string & sLocalizedString) = 0;
Parameters
Parameters
Description
const char * sKey
Key to be looked up. Key = Label without '@' sign.
string & sLocalizedString
Corresponding english language string.
Returns

True if successful, false otherwise (key not found).

ILocalizationManager::GetLanguage Method
C++
virtual const char* GetLanguage() = 0;
ILocalizationManager::GetLocalizedInfoByIndex Method (int, SLocalizedInfoEditor&)

Get the localization info structure at index nIndex.

C++
virtual bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoEditor& outEditorInfo) = 0;
Parameters
Parameters
Description
int nIndex
Index.
SLocalizedInfoEditor& outEditorInfo
Reference to localization info structure to be filled in.
Returns

True if successful, false otherwise (out of bounds).

ILocalizationManager::GetLocalizedInfoByIndex Method (int, SLocalizedInfoGame&)

Get the localization info structure at index nIndex.

C++
virtual bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoGame& outGameInfo) = 0;
Parameters
Parameters
Description
int nIndex
Index.
SLocalizedInfoGame& outGameInfo
Reference to localization info structure to be filled in.
Returns

True if successful, false otherwise (out of bounds).

ILocalizationManager::GetLocalizedInfoByKey Method (char*, SLocalizedInfoGame&)

Get localization info structure corresponding to a key (key=label without the '@' sign).

C++
virtual bool GetLocalizedInfoByKey(const char* sKey, SLocalizedInfoGame& outGameInfo) = 0;
Parameters
Parameters
Description
const char* sKey
Key to be looked up. Key = Label without '@' sign.
SLocalizedInfoGame& outGameInfo
Reference to localization info structure to be filled in.
Returns

True if info for key was found, false otherwise.

ILocalizationManager::GetLocalizedInfoByKey Method (char*, SLocalizedSoundInfoGame*)

Get the sound localization info structure corresponding to a key.

C++
virtual bool GetLocalizedInfoByKey(const char* sKey, SLocalizedSoundInfoGame* pOutSoundInfo) = 0;
Parameters
Parameters
Description
const char* sKey
Key to be looked up. Key = Label without '@' sign.
outSoundInfo
reference to sound info structure to be filled in pSoundMoods requires nNumSoundMoods-times allocated memory on return nNumSoundMoods will hold how many SoundsMood entries are needed pEventParameters requires nNumEventParameters-times allocated memory on return nNumEventParameters will hold how many EventParameter entries are needed Passing 0 in the Num fields will make the query ignore checking for allocated memory
Returns

True if successful, false otherwise (key not found, or not enough memory provided to write additional info).

ILocalizationManager::GetLocalizedStringCount Method

Return number of localization entries.

C++
virtual int GetLocalizedStringCount() = 0;
ILocalizationManager::GetSubtitle Method

Get Subtitle for Key or Label .

C++
virtual bool GetSubtitle(const char* sKeyOrLabel, wstring& outSubtitle, bool bForceSubtitle = false) = 0;
Parameters
Parameters
Description
const char* sKeyOrLabel
Key or Label to be used for subtitle lookup. Key = Label without '@' sign.
wstring& outSubtitle
Subtitle (untouched if Key/Label not found).
bool bForceSubtitle = false
If true, get subtitle (sLocalized or sEnglish) even if not specified in Data file.
Returns

True if subtitle found (and outSubtitle filled in), false otherwise.

ILocalizationManager::InitLocalizationData Method
C++
virtual bool InitLocalizationData(const char* sFileName, bool bReload = false) = 0;
Description

load the descriptor file with tag information

ILocalizationManager::IsLanguageSupported Method
C++
ILocalizationManager::LangNameFromPILID Method
C++
virtual const char* LangNameFromPILID(const ILocalizationManager::EPlatformIndependentLanguageID id) = 0;
ILocalizationManager::LoadExcelXmlSpreadsheet Method
C++
virtual bool LoadExcelXmlSpreadsheet(const char* sFileName, bool bReload = false) = 0;
ILocalizationManager::LoadLocalizationDataByTag Method
C++
virtual bool LoadLocalizationDataByTag(const char* sTag, bool bReload = false) = 0;
Description

direct load of loca data by tag

ILocalizationManager::LocalizationBitfieldFromPILID Method
C++
static TLocalizatonBitfield LocalizationBitfieldFromPILID(EPlatformIndependentLanguageID pilid);
ILocalizationManager::LocalizeDate Method
C++
virtual void LocalizeDate(time_t t, bool bMakeLocalTime, bool bShort, bool bIncludeWeekday, wstring& outDateString) = 0;
ILocalizationManager::LocalizeDuration Method
C++
virtual void LocalizeDuration(int seconds, wstring& outDurationString) = 0;
ILocalizationManager::LocalizeLabel Method

Return the localized version corresponding to a label.

C++
virtual bool LocalizeLabel(const char* sLabel, wstring& outLocalizedString, bool bEnglish = false, ITempLocStringStorage** ppTmpStorage = 0) = 0;
Parameters
Parameters
Description
const char* sLabel
Label to be translated, must start with '@' sign.
wstring& outLocalizedString
Localized version of the label.
bool bEnglish = false
if true, returns the always present English version of the label.
Returns

True if localization was successful, false otherwise.

Description

A label has to start with '@' sign.

ILocalizationManager::LocalizeNumber Method (float, int, wstring&)
C++
virtual void LocalizeNumber(float number, int decimals, wstring& outNumberString) = 0;
ILocalizationManager::LocalizeNumber Method (int, wstring&)
C++
virtual void LocalizeNumber(int number, wstring& outNumberString) = 0;
ILocalizationManager::LocalizeString Method (char*, wstring&, bool)

Translate a string into the currently selected language.

C++
virtual bool LocalizeString(const char* sString, wstring& outLocalizedString, bool bEnglish = false) = 0;
Parameters
Parameters
Description
const char* sString
String to be translated.
wstring& outLocalizedString
Translated version of the string.
bool bEnglish = false
if true, translates the string into the always present English language.
Returns

true if localization was successful, false otherwise

Description

Processes the input string and translates all labels contained into the currently selected language.

ILocalizationManager::LocalizeString Method (string&, wstring&, bool)

Same as LocalizeString( const char* sString, wstring& outLocalizedString, bool bEnglish=false ) but at the moment this is faster.

C++
virtual bool LocalizeString(const string& sString, wstring& outLocalizedString, bool bEnglish = false) = 0;
ILocalizationManager::LocalizeTime Method
C++
virtual void LocalizeTime(time_t t, bool bMakeLocalTime, bool bShowSeconds, wstring& outTimeString) = 0;
ILocalizationManager::MaskSystemLanguagesFromSupportedLocalizations Method
C++
virtual ILocalizationManager::TLocalizatonBitfield MaskSystemLanguagesFromSupportedLocalizations(const ILocalizationManager::TLocalizatonBitfield systemLanguages) = 0;
ILocalizationManager::ReleaseLocalizationDataByTag Method
C++
virtual bool ReleaseLocalizationDataByTag(const char* sTag) = 0;
ILocalizationManager::ReloadData Method
C++
virtual void ReloadData() = 0;
ILocalizationManager::RequestLoadLocalizationDataByTag Method
C++
virtual bool RequestLoadLocalizationDataByTag(const char* sTag) = 0;
Description

request to load loca data by tag. Actual loading will happen during next level load begin event.

ILocalizationManager::SetAvailableLocalizationsBitField Method
C++
virtual void SetAvailableLocalizationsBitField(const ILocalizationManager::TLocalizatonBitfield availableLocalizations) = 0;
ILocalizationManager::SetAvailableLocalizationsCSVString Method
C++
virtual void SetAvailableLocalizationsCSVString(const char * sAvailableLocalizations) = 0;
ILocalizationManager::SetLanguage Method
C++
virtual bool SetLanguage(const char* sLanguage) = 0;
ILocalizationManager::ToLowerCase Method
C++
virtual wchar_t ToLowerCase(wchar_t c) = 0;
ILocalizationManager::ToUpperCase Method
C++
virtual wchar_t ToUpperCase(wchar_t c) = 0;
ILocalizationManager::TLocalizatonBitfield Nested Type
C++
typedef uint32 TLocalizatonBitfield;