Esempio n. 1
0
        protected override string ToDotnetFallbackLanguage(PlatformCultureInfo platformCultureInfo)
        {
            var languageCode = platformCultureInfo.LanguageCode;

            switch (platformCultureInfo.LanguageCode)
            {
            case "gsw":
                languageCode = "de-CH";
                break;
            }

            return(languageCode);
        }
Esempio n. 2
0
        protected override string ToDotnetFallbackLanguage(PlatformCultureInfo platformCultureInfo)
        {
            var languageCode = platformCultureInfo.LanguageCode; // use the first part of the identifier (two chars, usually);

            switch (platformCultureInfo.LanguageCode)
            {
            case "pt":
                languageCode = "pt-PT";     // fallback to Portuguese (Portugal)
                break;

            case "gsw":
                languageCode = "de-CH";     // equivalent to German (Switzerland) for this app
                break;

                // add more application-specific cases here (if required)
                // ONLY use cultures that have been tested and known to work
            }

            return(languageCode);
        }