Class LocalizationSettings
The localization settings is the core component to the localization system.
It provides the entry point to all player based localization features.
Inheritance
LocalizationSettings
Syntax
public class LocalizationSettings : ScriptableObject
Properties
AssetDatabase
The asset database is responsible for providing localized assets.
Declaration
public static LocalizedAssetDatabase AssetDatabase { get; set; }
Property Value
AvailableLocales
Declaration
public static ILocalesProvider AvailableLocales { get; set; }
Property Value
HasSettings
Indicates if there is a LocalizationSettings present. If one is not found will attempt to find one however
unlike Instance it will not create a default, if one can not be found.
Declaration
public static bool HasSettings { get; }
Property Value
Type |
Description |
Boolean |
true if has settings; otherwise, false .
|
HasStringDatabase
Does the LocalizationSettings exist and contain a string database?
Declaration
public static bool HasStringDatabase { get; }
Property Value
Type |
Description |
Boolean |
true if has string database; otherwise, false .
|
InitializationOperation
The localization system may not be immediately ready. Loading Locales, preloading assets etc.
This operation can be used to check when the system is ready. You can yield on this in a coroutine to wait.
Declaration
public static AsyncOperationHandle<LocalizationSettings> InitializationOperation { get; }
Property Value
Instance
Singleton instance for the Localization Settings.
Declaration
public static LocalizationSettings Instance { get; set; }
Property Value
SelectedLocale
The current selected locale. This is the locale that will be used when localizing assets.
Declaration
public static Locale SelectedLocale { get; set; }
Property Value
StartupLocaleSelectors
Declaration
public static List<IStartupLocaleSelector> StartupLocaleSelectors { get; set; }
Property Value
StringDatabase
The string database is responsible for providing localized string assets.
Declaration
public static LocalizedStringDatabase StringDatabase { get; set; }
Property Value
Methods
GetAssetDatabase()
Declaration
public LocalizedAssetDatabase GetAssetDatabase()
Returns
GetAvailableLocales()
Declaration
public ILocalesProvider GetAvailableLocales()
Returns
GetInitializationOperation()
Declaration
public AsyncOperationHandle<LocalizationSettings> GetInitializationOperation()
Returns
GetInstanceDontCreateDefault()
Returns the singleton of the LocalizationSettings but does not create a default one if no active settings are found.
Declaration
public static LocalizationSettings GetInstanceDontCreateDefault()
Returns
GetSelectedLocale()
Declaration
public Locale GetSelectedLocale()
Returns
GetStartupLocaleSelectors()
Declaration
public List<IStartupLocaleSelector> GetStartupLocaleSelectors()
Returns
GetStringDatabase()
Returns the string database being used to localize all strings.
Declaration
public LocalizedStringDatabase GetStringDatabase()
Returns
OnLocaleRemoved(Locale)
Declaration
public void OnLocaleRemoved(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
SetAssetDatabase(LocalizedAssetDatabase)
Declaration
public void SetAssetDatabase(LocalizedAssetDatabase database)
Parameters
SetAvailableLocales(ILocalesProvider)
Declaration
public void SetAvailableLocales(ILocalesProvider available)
Parameters
SetSelectedLocale(Locale)
Declaration
public void SetSelectedLocale(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
SetStartupLocaleSelectors(List<IStartupLocaleSelector>)
Declaration
public void SetStartupLocaleSelectors(List<IStartupLocaleSelector> selector)
Parameters
SetStringDatabase(LocalizedStringDatabase)
Sets the string database to be used for localizing all strings.
Declaration
public void SetStringDatabase(LocalizedStringDatabase database)
Parameters
Events
OnSelectedLocaleChanged
Declaration
public event Action<Locale> OnSelectedLocaleChanged
Event Type
SelectedLocaleChanged
Declaration
public static event Action<Locale> SelectedLocaleChanged
Event Type