Class StringTable | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class StringTable

    Inheritance
    System.Object
    LocalizedTable
    StringTableBase
    StringTable
    Inherited Members
    StringTableBase.PluralHandler
    LocalizedTable.LocaleIdentifier
    LocalizedTable.TableName
    Namespace: UnityEngine.Localization
    Syntax
    public class StringTable : StringTableBase

    Methods

    AddKey(String)

    Add a new key to the table. Must be unique or it will be ignored.

    Declaration
    public override void AddKey(string key)
    Parameters
    Type Name Description
    System.String key
    Overrides
    LocalizedTable.AddKey(String)

    GetEntry(String)

    Declaration
    public StringTableEntry GetEntry(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    StringTableEntry

    GetKeys(HashSet<String>)

    Populate the HashSet with all keys in this table. Allows us to collate the keys from multiple locale for the same table name.

    Declaration
    public override void GetKeys(HashSet<string> keySet)
    Parameters
    Type Name Description
    HashSet<System.String> keySet
    Overrides
    LocalizedTable.GetKeys(HashSet<String>)

    GetLocalizedPluralString(String, Int32)

    Gets the localized plural string using the PluralHandler.

    Declaration
    public override string GetLocalizedPluralString(string key, int n)
    Parameters
    Type Name Description
    System.String key

    Key or the original singular form.

    System.Int32 n

    Plural amount

    Returns
    Type Description
    System.String

    The localized plural string. E.G '{0} files removed' or null if one can not be found.

    Overrides
    StringTableBase.GetLocalizedPluralString(String, Int32)

    GetLocalizedString(String)

    Returns the localized version of the string or null if one can not be found.

    Declaration
    public override string GetLocalizedString(string key)
    Parameters
    Type Name Description
    System.String key
    Returns
    Type Description
    System.String
    Overrides
    StringTableBase.GetLocalizedString(String)

    RemoveKey(String)

    Remove the key if it exists.

    Declaration
    public override void RemoveKey(string key)
    Parameters
    Type Name Description
    System.String key
    Overrides
    LocalizedTable.RemoveKey(String)

    ReplaceKey(String, String)

    Replace the old key value with the newKey value.

    Declaration
    public override void ReplaceKey(string key, string newKey)
    Parameters
    Type Name Description
    System.String key
    System.String newKey
    Overrides
    LocalizedTable.ReplaceKey(String, String)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023