Exemplo n.º 1
0
 public string GetLocalizationTitle(SupportedLocale locale)
 {
     switch (locale)
     {
         case SupportedLocale.German:
             return "Deutsch";
         case SupportedLocale.English:
             return "English";
     }
     return string.Empty;
 }
Exemplo n.º 2
0
 public string GetCultureString(SupportedLocale locale)
 {
     switch (locale)
     {
         case SupportedLocale.German:
             return "de-DE";
         case SupportedLocale.English:
             return "en-US";
     }
     return GlobalizationPreferences.Languages[0];
 }
Exemplo n.º 3
0
        public string GetRestartRequiredLabelForNewLanguage(SupportedLocale locale)
        {
            switch (locale)
            {
            case SupportedLocale.German:
                return("Du musst die App neu starten, damit die Änderung der Sprache sichtbar wird.");

            case SupportedLocale.Czech:
                return("Aby se změna jazyka projevila, je třeba aplikaci znovu spustit.");

            default:
                return("You have to restart the app in order to see the language changes.");
            }
        }
Exemplo n.º 4
0
        public SettingsViewModel(SettingsService settings, LocalizationService localization)
        {
            _settings = settings;
            _localization = localization;

            _distanceUnit = settings.DistanceUnit;
            _displayedLocale = settings.CurrentLocale;
            _locale = settings.CurrentLocale;
            _showExperimentalCities = settings.ShowExperimentalCities;
            RaisePropertyChanged(() => Locale);
            RaisePropertyChanged(() => LocaleDefaultIndex);
            RaisePropertyChanged(() => LanguageChanged);
            RaisePropertyChanged(() => ChangeLanguageString);
        }
Exemplo n.º 5
0
        public SettingsViewModel(SettingsService settings, LocalizationService localization)
        {
            _settings     = settings;
            _localization = localization;

            _distanceUnit           = settings.DistanceUnit;
            _displayedLocale        = settings.CurrentLocale;
            _locale                 = settings.CurrentLocale;
            _showExperimentalCities = settings.ShowExperimentalCities;
            RaisePropertyChanged(() => Locale);
            RaisePropertyChanged(() => LocaleDefaultIndex);
            RaisePropertyChanged(() => LanguageChanged);
            RaisePropertyChanged(() => ChangeLanguageString);
            RaisePropertyChanged(() => HasVoiceCommands);
        }
Exemplo n.º 6
0
        public string GetLocalizationTitle(SupportedLocale locale)
        {
            switch (locale)
            {
            case SupportedLocale.German:
                return("Deutsch");

            case SupportedLocale.English:
                return("English");

            case SupportedLocale.Czech:
                return("Čeština");
            }
            return(string.Empty);
        }
Exemplo n.º 7
0
        public string GetCultureString(SupportedLocale locale)
        {
            switch (locale)
            {
            case SupportedLocale.German:
                return("de-DE");

            case SupportedLocale.Czech:
                return("cs-CZ");

            case SupportedLocale.English:
                return("en-US");
            }
            return(GlobalizationPreferences.Languages[0]);
        }
Exemplo n.º 8
0
 public bool HasVoiceCommands(SupportedLocale locale)
 {
     return(locale == SupportedLocale.German || locale == SupportedLocale.English);
 }
Exemplo n.º 9
0
 public CultureInfo GetCulture(SupportedLocale locale)
 {
     return(new CultureInfo(GetCultureString(locale)));
 }
Exemplo n.º 10
0
        public void UpdateCulture(SupportedLocale locale)
        {
            var loc = GetCultureString(locale);

            ApplicationLanguages.PrimaryLanguageOverride = loc;
        }
Exemplo n.º 11
0
 public string GetRestartRequiredLabelForNewLanguage(SupportedLocale locale)
 {
     switch (locale)
     {
         case SupportedLocale.German:
             return "Du musst die App neu starten, damit die Änderung der Sprache sichtbar wird.";
         default:
             return "You have to restart the app in order to see the language changes.";
     }
 }
Exemplo n.º 12
0
 public CultureInfo GetCulture(SupportedLocale locale)
 {
     return new CultureInfo(GetCultureString(locale));
 }
Exemplo n.º 13
0
 public void UpdateCulture(SupportedLocale locale)
 {
     var loc = GetCultureString(locale);
     ApplicationLanguages.PrimaryLanguageOverride = loc;
 }