Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# jernejl 2/3/2010 3:23 PM
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:
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
# martijnb 2/5/2010 7:03 PM
Added to the 1.6.x branch (Sourceforge SVN).

Thanks a lot!
# jernejl 2/6/2010 9:04 PM
I also added another option to show the language name and flag in the module. I guess it would be best to send you a patch for that?

We (in our company) are also translating the administration using resources. How should we prepare that for inclusion? I know it's kind of in vain but we went for the stable version and need to have the administration localized.
# martijnb 2/7/2010 6:27 PM
jernejlI also added another option to show the language name and flag in the module. I guess it would be best to send you a patch for that?

Create a jira ticket and attach the patch over there.
We (in our company) are also translating the administration using resources. How should we prepare that for inclusion? I know it's kind of in vain but we went for the stable version and need to have the administration localized.

We still have the 1.6.x branch. I think even for the old version, it's still a valuable improvement.
# jernejl 2/8/2010 7:34 PM
Great! I'll create the tickets for both. Thanks!