#
jernejl
Hi!
I've been working a bit with the LanguageSwitcher module and everything came out just fine. Except for the chinese language text, because it was not returning the native name OK (one character missing). It came down to multibyte character problems. To get it working OK I had to make some changes to the Globalization.cs.
Here is the changed part:
How do I get that in the repository? Oh, almost forgot. I was working on the 1.6 branch.
Thanks,
Jernej Logar
I've been working a bit with the LanguageSwitcher module and everything came out just fine. Except for the chinese language text, because it was not returning the native name OK (one character missing). It came down to multibyte character problems. To get it working OK I had to make some changes to the Globalization.cs.
Here is the changed part:
public static string GetNativeLanguageTextFromCulture(string culture)
{
var ci = new CultureInfo(culture);
var enumerator = StringInfo.GetTextElementEnumerator(ci.NativeName);
var languageAsText = "";
while (enumerator.MoveNext())
{
var textElement = enumerator.GetTextElement();
if (textElement == "(") break;
languageAsText += textElement;
}
return languageAsText;
}How do I get that in the repository? Oh, almost forgot. I was working on the 1.6 branch.
Thanks,
Jernej Logar