docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PlayerPrefLocaleSelector

    Uses the Player Prefs to keep track of the last used locale. Whenever the locale is changed, the new Locale is recorded in the Player prefs.

    Inheritance
    object
    PlayerPrefLocaleSelector
    Implements
    IStartupLocaleSelector
    IInitialize
    Namespace: UnityEngine.Localization.Settings
    Assembly: Unity.Localization.dll
    Syntax
    [Serializable]
    public class PlayerPrefLocaleSelector : IStartupLocaleSelector, IInitialize

    Properties

    Name Description
    PlayerPreferenceKey

    The Player Pref key to use.

    Methods

    Name Description
    GetStartupLocale(ILocalesProvider)

    Returns the last locale set or null if no value has been recorded yet.

    PostInitialization(LocalizationSettings)

    Registers a callback to SelectedLocaleChanged in order to save changes made to the Locale.

    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)