mirror of
https://github.com/bitwarden/android.git
synced 2024-12-20 08:12:26 +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,6 +58,16 @@ 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"))
|
||||||
|
{
|
||||||
|
netLanguage = "zh-Hans";
|
||||||
|
}
|
||||||
|
else if(netLanguage.StartsWith("zh-Hant"))
|
||||||
|
{
|
||||||
|
netLanguage = "zh-Hant";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//certain languages need to be converted to CultureInfo equivalent
|
//certain languages need to be converted to CultureInfo equivalent
|
||||||
switch(iOSLanguage)
|
switch(iOSLanguage)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +81,7 @@ namespace Bit.iOS.Core.Services
|
||||||
// add more application-specific cases here (if required)
|
// add more application-specific cases here (if required)
|
||||||
// ONLY use cultures that have been tested and known to work
|
// ONLY use cultures that have been tested and known to work
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Console.WriteLine(".NET Language/Locale:" + netLanguage);
|
Console.WriteLine(".NET Language/Locale:" + netLanguage);
|
||||||
return netLanguage;
|
return netLanguage;
|
||||||
|
@ -83,7 +94,6 @@ namespace Bit.iOS.Core.Services
|
||||||
|
|
||||||
switch(platCulture.LanguageCode)
|
switch(platCulture.LanguageCode)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
case "pt":
|
case "pt":
|
||||||
netLanguage = "pt-PT"; // fallback to Portuguese (Portugal)
|
netLanguage = "pt-PT"; // fallback to Portuguese (Portugal)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue