Search Results for

    Show / Hide Table of Contents

    Class LocalizedStringTable

    Contains localized strings table for a given culture.

    Inheritance
    System.Object
    Object
    Asset
    JsonAssetBase
    LocalizedStringTable
    Inherited Members
    JsonAssetBase.Init(String, String)
    JsonAssetBase.GetReferences(String, Guid[])
    JsonAssetBase.DataTypeName
    JsonAssetBase.DataEngineBuild
    JsonAssetBase.Data
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public class LocalizedStringTable : JsonAssetBase

    Constructors

    LocalizedStringTable()

    Initializes a new instance of the LocalizedStringTable.

    Declaration
    public 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.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)

    See Also

    JsonAssetBase
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat