Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SelectedLocale

The currently selected locale, or null when none is selected.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Property
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public static Locale SelectedLocale { get; set; }

Remarks

Reading this returns the active locale, falling back to LocalizationSettings.ProjectLocale when no explicit selection has been made. Setting it changes the locale and raises LocalizationSettings.SelectedLocaleChanged. The value is stored as a locale code, so the assigned locale should be one of the LocalizationSettings.AvailableLocales.