| Parameter | Description |
|---|---|
| identifier | The identifier of the locale to find. |
Locale The registered locale that matches the identifier, or null when none matches.
Returns the available locale with the given identifier, or null.
Searches LocalizationSettings.AvailableLocales for a locale whose LocaleIdentifier matches, including
disabled locales. The match is case-insensitive on the locale code. Use this to turn a code into a
Locale before assigning it to LocalizationSettings.SelectedLocale.
<para>Finds a locale by code and selects it.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class GetLocaleExample { public void Run() { Locale french = LocalizationSettings.Instance.GetLocale(new LocaleIdentifier("fr")); if (french != null) LocalizationSettings.SelectedLocale = french; } } }