Search Results for

    Show / Hide Table of Contents

    Class Localization

    A collection of localization related helper utilities.

    Inheritance
    System.Object
    Localization
    Namespace: GDX
    Syntax
    public static class Localization

    Fields

    | Improve this Doc View Source

    LocalTimestampFormat

    The local ISO 8601 compliant System.DateTime.ToString(System.String).

    Declaration
    public const string LocalTimestampFormat = "yyyy-MM-dd HH\\:mm\\:ss"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    UtcTimestampFormat

    The UTC ISO 8601 compliant System.DateTime.ToString(System.String).

    Declaration
    public const string UtcTimestampFormat = "yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz"
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    GetHumanReadableFileSize(Int64)

    Creates a more human readable System.String of a byte size.

    Declaration
    public static string GetHumanReadableFileSize(long base2Size)
    Parameters
    Type Name Description
    System.Int64 base2Size

    The number of bytes (binary) to measure.

    Returns
    Type Description
    System.String

    A human readable version of the provided base2Size.

    Examples

    A byte size of 1024, will return a string of 1 KB.

    | Improve this Doc View Source

    GetIETF(Localization.Language)

    Get the IETF language code for targetLanguage.

    Declaration
    public static string GetIETF(this Localization.Language targetLanguage)
    Parameters
    Type Name Description
    Localization.Language targetLanguage

    The target Localization.Language.

    Returns
    Type Description
    System.String

    The language code.

    Remarks

    Two additional non-compliant values may be returned DEV or DEFAULT.

    | Improve this Doc View Source

    GetISO639_1(Localization.Language)

    Get the ISO 639-1 language code for targetLanguage.

    Declaration
    public static string GetISO639_1(this Localization.Language targetLanguage)
    Parameters
    Type Name Description
    Localization.Language targetLanguage

    The target Localization.Language.

    Returns
    Type Description
    System.String

    The language code.

    Remarks

    Two additional non-compliant values may be returned DEV or DEFAULT.

    | Improve this Doc View Source

    GetSystemLanguage()

    Get the Localization.Language equivalent of the UnityEngine.SystemLanguage.

    Declaration
    public static Localization.Language GetSystemLanguage()
    Returns
    Type Description
    Localization.Language

    The appropriate Localization.Language, or default.

    | Improve this Doc View Source

    GetTimestampFormat(Localization.Language)

    Get the localized System.DateTime.System.DateTime.ToString(System.String) for targetLanguage.

    Declaration
    public static string GetTimestampFormat(this Localization.Language targetLanguage)
    Parameters
    Type Name Description
    Localization.Language targetLanguage

    The target Localization.Language.

    Returns
    Type Description
    System.String

    The format System.String.

    | Improve this Doc View Source

    SetDefaultCulture()

    Sets the current threads culture to a defined setting in GDXConfig.

    Declaration
    [RuntimeInitializeOnLoadMethod]
    public static void SetDefaultCulture()
    Remarks

    Can be used to avoid issues with culture settings without a Gregorian Calendar. Configurable to automatically execute after assemblies are loaded.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Built on 2021-04-06 against v1.3.0.
    Generated by DocFX