docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Property CultureInfo

    CultureInfo

    A CultureInfo representation of the Locale. The Code is used to query for a valid [CultureInfo}(https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo). If a value can not be determined from the Code then null will be returned.

    Declaration
    public CultureInfo CultureInfo { get; }
    Property Value
    Type Description
    CultureInfo
    Examples

    This example shows how the CultureInfo can be retrieved after creating a LocaleIdentifier using a Code.

    public class CultureInfoExample : MonoBehaviour
    {
        void Start()
        {
            var localeIdentifier = new LocaleIdentifier("en");
            Debug.Log("Code 'en' maps to the CultureInfo: " + localeIdentifier.CultureInfo.NativeName);
        }
    }
    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)