Class LocalesProvider
Responsible for providing the list of locales that are currently available to this application.
Namespace: UnityEngine.Localization.Settings
Assembly: Unity.Localization.dll
Syntax
[Serializable]
public class LocalesProvider : ILocalesProvider, IPreloadRequired, IReset
Properties
| Name | Description |
|---|---|
| Locales | The list of all supported locales. |
| PreloadOperation | The Locales loading operation. When set to isDone then all locales have been loaded. Can be Null if the operation has not started yet. |
Methods
| Name | Description |
|---|---|
| AddLocale(Locale) | Add a Locale to allow support for a specific language. |
| FindFallbackLocale(LocaleIdentifier) | Attempt to retrieve a fallback Locale using the identifier. |
| GetLocale(string) | Attempt to retrieve a Locale or fallback Locale using a Code. |
| GetLocale(LocaleIdentifier) | Attempt to retrieve a Locale or fallback Locale using the identifier. |
| GetLocale(SystemLanguage) | Attempt to retrieve a Locale or fallback Locale using a SystemLanguage. |
| RemoveLocale(Locale) | Removes support for a specific Locale. |
| ResetState() | Resets the state of the provider by removing all the Locales and clearing the preload operation. |