mirror of
https://github.com/bitwarden/android.git
synced 2024-12-18 23:31:52 +03:00
Chinese support on iOS
This commit is contained in:
parent
7728046309
commit
b2712119d1
1 changed files with 22 additions and 12 deletions
|
@ -58,18 +58,29 @@ namespace Bit.iOS.Core.Services
|
|||
Console.WriteLine("iOS Language:" + iOSLanguage);
|
||||
var netLanguage = iOSLanguage;
|
||||
|
||||
//certain languages need to be converted to CultureInfo equivalent
|
||||
switch(iOSLanguage)
|
||||
if(netLanguage.StartsWith("zh-Hans"))
|
||||
{
|
||||
case "ms-MY": // "Malaysian (Malaysia)" not supported .NET culture
|
||||
case "ms-SG": // "Malaysian (Singapore)" not supported .NET culture
|
||||
netLanguage = "ms"; // closest supported
|
||||
break;
|
||||
case "gsw-CH": // "Schwiizertüütsch (Swiss German)" not supported .NET culture
|
||||
netLanguage = "de-CH"; // closest supported
|
||||
break;
|
||||
// add more application-specific cases here (if required)
|
||||
// ONLY use cultures that have been tested and known to work
|
||||
netLanguage = "zh-Hans";
|
||||
}
|
||||
else if(netLanguage.StartsWith("zh-Hant"))
|
||||
{
|
||||
netLanguage = "zh-Hant";
|
||||
}
|
||||
else
|
||||
{
|
||||
//certain languages need to be converted to CultureInfo equivalent
|
||||
switch(iOSLanguage)
|
||||
{
|
||||
case "ms-MY": // "Malaysian (Malaysia)" not supported .NET culture
|
||||
case "ms-SG": // "Malaysian (Singapore)" not supported .NET culture
|
||||
netLanguage = "ms"; // closest supported
|
||||
break;
|
||||
case "gsw-CH": // "Schwiizertüütsch (Swiss German)" not supported .NET culture
|
||||
netLanguage = "de-CH"; // closest supported
|
||||
break;
|
||||
// add more application-specific cases here (if required)
|
||||
// ONLY use cultures that have been tested and known to work
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine(".NET Language/Locale:" + netLanguage);
|
||||
|
@ -83,7 +94,6 @@ namespace Bit.iOS.Core.Services
|
|||
|
||||
switch(platCulture.LanguageCode)
|
||||
{
|
||||
//
|
||||
case "pt":
|
||||
netLanguage = "pt-PT"; // fallback to Portuguese (Portugal)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue