docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LocalesProvider

    Responsible for providing the list of locales that are currently available to this application.

    Inheritance
    object
    LocalesProvider
    Implements
    ILocalesProvider
    IPreloadRequired
    IReset
    Namespace: UnityEngine.Localization.Settings
    Assembly: Unity.Localization.dll
    Syntax
    [Serializable]
    public class LocalesProvider : ILocalesProvider, IPreloadRequired, IReset

    Properties

    Name Description
    Locales

    The list of all supported locales.

    PreloadOperation

    The Locales loading operation. When set to isDone then all locales have been loaded. Can be Null if the operation has not started yet.

    Methods

    Name Description
    AddLocale(Locale)

    Add a Locale to allow support for a specific language.

    FindFallbackLocale(LocaleIdentifier)

    Attempt to retrieve a fallback Locale using the identifier.

    GetLocale(string)

    Attempt to retrieve a Locale or fallback Locale using a Code.

    GetLocale(LocaleIdentifier)

    Attempt to retrieve a Locale or fallback Locale using the identifier.

    GetLocale(SystemLanguage)

    Attempt to retrieve a Locale or fallback Locale using a SystemLanguage.

    RemoveLocale(Locale)

    Removes support for a specific Locale.

    ResetState()

    Resets the state of the provider by removing all the Locales and clearing the preload operation.

    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)