docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetLocalizedString

    GetLocalizedString()

    Returns the localized text after formatting has been applied. This will use SmartFormat if IsSmart is true else it will return the raw unformatted value.

    Declaration
    public string GetLocalizedString()
    Returns
    Type Description
    string
    Remarks

    The following process is applied when generating a localized string:

    GetLocalizedString(params object[])

    Returns the localized text after formatting has been applied. Formatting will use SmartFormat if IsSmart is true else it will default to String.Format.

    Declaration
    public string GetLocalizedString(params object[] args)
    Parameters
    Type Name Description
    object[] args

    Arguments that will be applied to Smart Format or String.Format.

    Returns
    Type Description
    string

    GetLocalizedString(IList<object>)

    Returns the localized text after formatting has been applied. Formatting will use SmartFormat if IsSmart is true else it will default to String.Format.

    Declaration
    public string GetLocalizedString(IList<object> args)
    Parameters
    Type Name Description
    IList<object> args

    Arguments that will be applied to Smart Format or String.Format.

    Returns
    Type Description
    string

    GetLocalizedString(IFormatProvider, IList<object>)

    Returns the localized text after formatting has been applied. Formatting will use SmartFormat is IsSmart is true else it will default to String.Format.

    Declaration
    public string GetLocalizedString(IFormatProvider formatProvider, IList<object> args)
    Parameters
    Type Name Description
    IFormatProvider formatProvider

    Custom format provider used with String.Format and smart strings. If formatProvider is null, RemoveFromTable uses the LocaleIdentifier's Formatter.

    IList<object> args

    Arguments that will be applied to Smart Format or String.Format.

    Returns
    Type Description
    string

    GetLocalizedString(IFormatProvider, IList<object>, PseudoLocale)

    Returns the localized text after formatting has been applied. Formatting will use SmartFormat is IsSmart is true else it will default to String.Format.

    Declaration
    public string GetLocalizedString(IFormatProvider formatProvider, IList<object> args, PseudoLocale pseudoLocale)
    Parameters
    Type Name Description
    IFormatProvider formatProvider

    Custom format provider used with String.Format and smart strings. If formatProvider is null, RemoveFromTable uses the LocaleIdentifier's Formatter.

    IList<object> args

    Arguments that are be applied to Smart Format or String.Format.

    PseudoLocale pseudoLocale

    Optional PseudoLocale that will be applied to the final string.

    Returns
    Type Description
    string
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)