docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetLocales

    GetLocales()

    Returns all Locale that are part of the Localization system and will be included in the player. To Add Locales use AddLocale(Locale, bool) and RemoveLocale(Locale, bool) to remove them. Note this does not include PseudoLocale which can be retrieved by using GetPseudoLocales().

    Declaration
    public static ReadOnlyCollection<Locale> GetLocales()
    Returns
    Type Description
    ReadOnlyCollection<Locale>

    A collection of all Locales in the project.

    Examples

    This example prints the names of the Locales.

    foreach (var locale in LocalizationEditorSettings.GetLocales())
    {
        Debug.Log(locale.LocaleName);
    }
    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)