static SettingsPage() { Cultures = new AvailableCulture[] { new AvailableCulture() { Code = "en-US", Label = "English" }, new AvailableCulture() { Code = "fr-FR", Label = "Français" }, }; }
/// <summary> /// Change the culture of application with the <paramref name="culture" /> specified /// </summary> /// <param name="culture">The culture to be used in application</param> public static void SetCulture(AvailableCulture culture) { switch (culture) { case AvailableCulture.Portuguese: ChangeCulture("pt-BR"); break; case AvailableCulture.English: ChangeCulture("en-US"); break; default: throw new ArgumentOutOfRangeException(nameof(culture), culture, null); } }