Class StringTableEntry
Inheritance
Namespace: UnityEngine.Localization
Syntax
[Serializable]
public class StringTableEntry
Constructors
StringTableEntry(UInt32)
Declaration
public StringTableEntry(uint id)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | id |
Properties
Id
The Key for this table entry. Must be unique for each table.
Declaration
public uint Id { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Translated
The translated text to use. When using plurals this is item 0 from the plurals list.
Declaration
public string Translated { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TranslatedPlurals
Returns all translated versions of the strings. Each item represents a plural version. See PluralForm on how to determine which item to use.
Declaration
public List<string> TranslatedPlurals { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
Methods
GetPlural(Int32)
Return the translated string for the given index.
Declaration
public string GetPlural(int n)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | Plural index. See PluralForm |
Returns
Type | Description |
---|---|
System.String |
SetPlural(Int32, String)
Sets the plural at n, if an entry does not exist then one is created.
Declaration
public void SetPlural(int n, string val)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | TranslatedPlurals index. |
System.String | val | Value to add/replace at n. |