Class LocalizedStringTable
Contains localized strings table for a given culture.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class LocalizedStringTable : JsonAssetBase
Constructors
LocalizedStringTable()
Properties
Entries
The string table. Maps the message id into the localized text. For plural messages the list contains separate items for value numbers.
Declaration
[Unmanaged]
public Dictionary<string, string[]> Entries { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.String, System.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
[Unmanaged]
public LocalizedStringTable FallbackTable { get; set; }
Property Value
LocalizedStringTable
|
Locale
The locale of the localized string table (eg. pl-PL).
Declaration
[Unmanaged]
public string Locale { get; set; }
Property Value
System.String
|
Methods
AddPluralString(String, String, Int32)
Adds the localized plural string to the table.
Declaration
[Unmanaged]
public void AddPluralString(string id, string value, int n)
Parameters
System.String
id
The message id. Used for lookups. |
System.String
value
The localized text. |
System.Int32
n
The plural value (0, 1, 2..). |
AddString(String, String)
Adds the localized string to the table.
Declaration
[Unmanaged]
public void AddString(string id, string value)
Parameters
System.String
id
The message id. Used for lookups. |
System.String
value
The localized text. |
GetPluralString(String, Int32)
Gets the localized plural string by using string id lookup. Uses fallback table if text is not included in this table.
Declaration
[Unmanaged]
public string GetPluralString(string id, int n)
Parameters
System.String
id
The message identifier. |
System.Int32
n
The value count for plural message selection. |
Returns
System.String
The localized text. |
GetString(String)
Gets the localized string by using string id lookup. Uses fallback table if text is not included in this table.
Declaration
[Unmanaged]
public string GetString(string id)
Parameters
System.String
id
The message identifier. |
Returns
System.String
The localized text. |