Method GetLocale
GetLocale(LocaleIdentifier)
Returns the locale that matches the LocaleIdentifier"/> in the project.
Declaration
public static Locale GetLocale(LocaleIdentifier localeId)
Parameters
Type | Name | Description |
---|---|---|
LocaleIdentifier | localeId |
Returns
Type | Description |
---|---|
Locale | The found Locale or null if one could not be found. |
Examples
This example shows how to find a Locale using a SystemLanguage or code.
// Find a Spanish Locale using the SystemLanguage
var spanish = LocalizationEditorSettings.GetLocale(SystemLanguage.Spanish);
// Find a Spanish (Mexico) Locale using the code
var spanishMexico = LocalizationEditorSettings.GetLocale("es-MX");