mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 09:58:27 +03:00
simplified chinese used for all chinese languages for now
This commit is contained in:
parent
b2712119d1
commit
6c847292c7
2 changed files with 25 additions and 20 deletions
|
@ -52,22 +52,30 @@ namespace Bit.Android.Services
|
||||||
Console.WriteLine("Android Language:" + androidLanguage);
|
Console.WriteLine("Android Language:" + androidLanguage);
|
||||||
var netLanguage = androidLanguage;
|
var netLanguage = androidLanguage;
|
||||||
|
|
||||||
// certain languages need to be converted to CultureInfo equivalent
|
if(netLanguage.StartsWith("zh"))
|
||||||
switch(androidLanguage)
|
|
||||||
{
|
{
|
||||||
case "ms-BN": // "Malaysian (Brunei)" not supported .NET culture
|
// simplified chinese used for all for now
|
||||||
case "ms-MY": // "Malaysian (Malaysia)" not supported .NET culture
|
netLanguage = "zh-Hans";
|
||||||
case "ms-SG": // "Malaysian (Singapore)" not supported .NET culture
|
}
|
||||||
netLanguage = "ms"; // closest supported
|
else
|
||||||
break;
|
{
|
||||||
case "in-ID": // "Indonesian (Indonesia)" has different code in .NET
|
// certain languages need to be converted to CultureInfo equivalent
|
||||||
netLanguage = "id-ID"; // correct code for .NET
|
switch(androidLanguage)
|
||||||
break;
|
{
|
||||||
case "gsw-CH": // "Schwiizertüütsch (Swiss German)" not supported .NET culture
|
case "ms-BN": // "Malaysian (Brunei)" not supported .NET culture
|
||||||
netLanguage = "de-CH"; // closest supported
|
case "ms-MY": // "Malaysian (Malaysia)" not supported .NET culture
|
||||||
break;
|
case "ms-SG": // "Malaysian (Singapore)" not supported .NET culture
|
||||||
// add more application-specific cases here (if required)
|
netLanguage = "ms"; // closest supported
|
||||||
// ONLY use cultures that have been tested and known to work
|
break;
|
||||||
|
case "in-ID": // "Indonesian (Indonesia)" has different code in .NET
|
||||||
|
netLanguage = "id-ID"; // correct code for .NET
|
||||||
|
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);
|
Console.WriteLine(".NET Language/Locale:" + netLanguage);
|
||||||
|
|
|
@ -58,14 +58,11 @@ namespace Bit.iOS.Core.Services
|
||||||
Console.WriteLine("iOS Language:" + iOSLanguage);
|
Console.WriteLine("iOS Language:" + iOSLanguage);
|
||||||
var netLanguage = iOSLanguage;
|
var netLanguage = iOSLanguage;
|
||||||
|
|
||||||
if(netLanguage.StartsWith("zh-Hans"))
|
if(netLanguage.StartsWith("zh"))
|
||||||
{
|
{
|
||||||
|
// simplified chinese used for all for now
|
||||||
netLanguage = "zh-Hans";
|
netLanguage = "zh-Hans";
|
||||||
}
|
}
|
||||||
else if(netLanguage.StartsWith("zh-Hant"))
|
|
||||||
{
|
|
||||||
netLanguage = "zh-Hant";
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//certain languages need to be converted to CultureInfo equivalent
|
//certain languages need to be converted to CultureInfo equivalent
|
||||||
|
|
Loading…
Reference in a new issue