Class LocalizedStringTable
Contains localized strings table for a given culture.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Localization/LocalizedStringTable.h
Syntax
public class LocalizedStringTable : public JsonAssetBase
Fields
Entries
The string table. Maps the message id into the localized text. For plural messages the list contains separate items for value numbers.
Declaration
public Dictionary<String, Array<String>> Entries
Field Value
Dictionary<String, Array<String>>
|
FallbackTable
The fallback language table to use for missing keys. Eg. table for 'en-GB' can point to 'en' as a fallback to prevent problem of missing localized strings.
Declaration
public SoftObjectReference<LocalizedStringTable> FallbackTable
Field Value
SoftObjectReference<LocalizedStringTable>
|
Locale
The locale of the localized string table (eg. pl-PL).
Declaration
public String Locale
Field Value
String
|
Methods
AddPluralString(const StringView& id, const StringView& value, int32 n)
Adds the localized plural string to the table.
Declaration
public void AddPluralString(const StringView& id, const StringView& value, int32 n)
Parameters
StringView
id
The message id. Used for lookups. |
StringView
value
The localized text. |
int32
n
The plural value (0, 1, 2..). |
AddString(const StringView& id, const StringView& value)
Adds the localized string to the table.
Declaration
public void AddString(const StringView& id, const StringView& value)
Parameters
StringView
id
The message id. Used for lookups. |
StringView
value
The localized text. |
GetPluralString(const String& id, int32 n)
Gets the localized plural string by using string id lookup. Uses fallback table if text is not included in this table.
Declaration
public String GetPluralString(const String& id, int32 n) const
Parameters
String
id
The message identifier. |
int32
n
The value count for plural message selection. |
Returns
String
The localized text. |
GetString(const String& id)
Gets the localized string by using string id lookup. Uses fallback table if text is not included in this table.
Declaration
public String GetString(const String& id) const
Parameters
String
id
The message identifier. |
Returns
String
The localized text. |
loadAsset()
Loads asset
Declaration
protected virtual LoadResult loadAsset() override
Returns
LoadResult
Loading result |
Overrides
OnGetData(rapidjson_flax::StringBuffer& buffer)
Declaration
protected virtual void OnGetData(rapidjson_flax::StringBuffer& buffer) const override
Parameters
rapidjson_flax::StringBuffer
buffer
|
Overrides
unload(bool isReloading)
Unloads asset data
Declaration
protected virtual void unload(bool isReloading) override
Parameters
bool
isReloading
True if asset is reloading data, otherwise false. |