Commit 85a39a97 authored by Alexandre Julliard's avatar Alexandre Julliard

kernelbase: Reimplement LOCALE_*LANGNAME in GetLocaleInfoW/Ex using the locale.nls data.

parent 956c88db
......@@ -906,10 +906,10 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SABBREVLANGNAME:
return -1;
return locale_return_string( locale->sabbrevlangname, type, buffer, len );
case LOCALE_SNATIVELANGNAME:
return -1;
return locale_return_string( locale->snativelangname, type, buffer, len );
case LOCALE_ICOUNTRY:
return -1;
......@@ -1094,7 +1094,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SISO639LANGNAME:
return -1;
return locale_return_string( locale->siso639langname, type, buffer, len );
case LOCALE_SISO3166CTRYNAME:
return -1;
......@@ -1126,7 +1126,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SISO639LANGNAME2:
return -1;
return locale_return_string( locale->siso639langname2, type, buffer, len );
case LOCALE_SISO3166CTRYNAME2:
return -1;
......@@ -1150,7 +1150,8 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SLOCALIZEDLANGUAGENAME:
return -1;
/* FIXME: localization */
return locale_return_string( locale->senglanguage, type, buffer, len );
case LOCALE_IREADINGLAYOUT:
return -1;
......@@ -1201,7 +1202,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return -1;
case LOCALE_SENGLANGUAGE:
return -1;
return locale_return_string( locale->senglanguage, type, buffer, len );
case LOCALE_SENGCOUNTRY:
return -1;
......
......@@ -525,8 +525,13 @@ static BOOL update_threadlocinfo_category(LCID lcid, unsigned short cp,
if(!locinfo->lc_category[category].locale) {
int len = 0;
len += GetLocaleInfoA(lcid, LOCALE_SENGLANGUAGE
|LOCALE_NOUSEROVERRIDE, buf, 256);
if (lcid == MAKELANGID( LANG_NORWEGIAN, SUBLANG_NORWEGIAN_NYNORSK ))
{
/* locale.nls contains "Norwegian Nynorsk" instead for LOCALE_SENGLANGUAGE */
strcpy( buf, "Norwegian-Nynorsk" );
len = strlen( buf ) + 1;
}
else len += GetLocaleInfoA(lcid, LOCALE_SENGLANGUAGE|LOCALE_NOUSEROVERRIDE, buf, 256);
buf[len-1] = '_';
len += GetLocaleInfoA(lcid, LOCALE_SENGCOUNTRY
|LOCALE_NOUSEROVERRIDE, &buf[len], 256-len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment