Selects a fixed locale by its identifier when that locale is available.
Use this selector to force a specific locale at startup regardless of the device or command line. Set
SpecificLocaleSelector.LocaleId to the LocaleIdentifier of the locale to select. If no available locale
matches the identifier, SpecificLocaleSelector.GetStartupLocale returns null and the next selector in
LocalizationSettings.StartupSelectors runs.
Additional resources: IStartupLocaleSelector, LocalizationSettings, Locale
<para>Selects French when it is one of the available locales.</para>
using Unity.Localization;
namespace Unity.Localization.Samples { public class SpecificLocaleSelectorExample { public Locale Run() { var selector = new SpecificLocaleSelector { LocaleId = new LocaleIdentifier("fr") }; Locale french = selector.GetStartupLocale(LocalizationSettings.Instance); return french; } } }
| Property | Description |
|---|---|
| LocaleId | The identifier of the locale to select. |