docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AddLocale

    AddLocale(Locale, bool)

    Add the Locale so that it can be used by the Localization system.

    Declaration
    public static void AddLocale(Locale locale, bool createUndo = false)
    Parameters
    Type Name Description
    Locale locale

    The Locale to add to the project so it can be used by the Localization system.

    bool createUndo

    Used to indicate if an Undo operation should be created.

    Examples

    This shows how to create a Locale and add it to the project.

    // Create the Locale asset
    var locale = Locale.CreateLocale(SystemLanguage.Spanish);
    AssetDatabase.CreateAsset(locale, "Assets/Spanish.asset");
    
    // Add the Locale to the project
    LocalizationEditorSettings.AddLocale(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)