Replace locale no-NO by nb-NO. Bug 533814, r=pike

This commit is contained in:
Simon Montagu 2009-12-22 04:53:05 -08:00
parent 4448d58d19
commit 4ea7b7df29

View File

@ -116,6 +116,12 @@ nsPosixLocale::GetXPLocale(const char* posixLocale, nsAString& locale)
return NS_OK;
}
// Special case: substitute "nb" (Norwegian Bokmal) for macrolanguage
// code "no" (Norwegian)
if (nsDependentCString(lang_code).LowerCaseEqualsLiteral("no")) {
lang_code[1] = 'b';
}
if (*country_code) {
PR_snprintf(posix_locale,sizeof(posix_locale),"%s-%s",lang_code,country_code);
}