mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[WINESYNC] kernel32: Use different default sublangs for Spanish and Chinese.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 7737693693ca46a88c41cfeab95d2b65423d8e51 by Andrew Eikum <aeikum@codeweavers.com>
This commit is contained in:
parent
a3102dc0dd
commit
544f114459
1 changed files with 5 additions and 3 deletions
|
@ -354,6 +354,7 @@ static UINT find_charset( const WCHAR *name )
|
|||
if (entry) return entry->codepage;
|
||||
return 0;
|
||||
}
|
||||
#endif // (WINVER >= 0x0600)
|
||||
|
||||
static LANGID get_default_sublang( LANGID lang )
|
||||
{
|
||||
|
@ -373,6 +374,7 @@ static LANGID get_default_sublang( LANGID lang )
|
|||
return lang;
|
||||
}
|
||||
|
||||
#if (WINVER >= 0x0600)
|
||||
/***********************************************************************
|
||||
* find_locale_id_callback
|
||||
*/
|
||||
|
@ -1720,7 +1722,7 @@ INT WINAPI GetLocaleInfoW( LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len )
|
|||
|
||||
/* replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */
|
||||
if (SUBLANGID(lang_id) == SUBLANG_NEUTRAL)
|
||||
lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT);
|
||||
lang_id = MAKELANGID(PRIMARYLANGID(lang_id), get_default_sublang( lang_id ));
|
||||
|
||||
if (lctype != LOCALE_FONTSIGNATURE)
|
||||
{
|
||||
|
@ -2868,7 +2870,7 @@ LCID WINAPI ConvertDefaultLocale( LCID lcid )
|
|||
langid = LANGIDFROMLCID(lcid);
|
||||
if (SUBLANGID(langid) == SUBLANG_NEUTRAL)
|
||||
{
|
||||
langid = MAKELANGID(PRIMARYLANGID(langid), SUBLANG_DEFAULT);
|
||||
langid = MAKELANGID(PRIMARYLANGID(langid), get_default_sublang( langid ));
|
||||
lcid = MAKELCID(langid, SORTIDFROMLCID(lcid));
|
||||
}
|
||||
}
|
||||
|
@ -4407,7 +4409,7 @@ static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSiz
|
|||
langId = GetSystemDefaultLangID();
|
||||
|
||||
if (SUBLANGID(langId) == SUBLANG_NEUTRAL)
|
||||
langId = MAKELANGID( PRIMARYLANGID(langId), SUBLANG_DEFAULT );
|
||||
langId = MAKELANGID(PRIMARYLANGID(langId), get_default_sublang( langId ));
|
||||
|
||||
hResource = FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, szResourceName, langId );
|
||||
|
||||
|
|
Loading…
Reference in a new issue