Commit e51dc8f2 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

mlang: Implement IMultiLanguage_GetRfc1766Info.

parent 131ab8d8
...@@ -2536,8 +2536,38 @@ static HRESULT WINAPI fnIMultiLanguage_GetRfc1766Info( ...@@ -2536,8 +2536,38 @@ static HRESULT WINAPI fnIMultiLanguage_GetRfc1766Info(
LCID Locale, LCID Locale,
PRFC1766INFO pRfc1766Info) PRFC1766INFO pRfc1766Info)
{ {
FIXME("\n"); LCTYPE type = LOCALE_SLANGUAGE;
return E_NOTIMPL;
TRACE("(%p, 0x%04x, %p)\n", iface, Locale, pRfc1766Info);
if (!pRfc1766Info)
return E_INVALIDARG;
if ((PRIMARYLANGID(Locale) == LANG_ENGLISH) ||
(PRIMARYLANGID(Locale) == LANG_CHINESE) ||
(PRIMARYLANGID(Locale) == LANG_ARABIC)) {
if (!SUBLANGID(Locale))
type = LOCALE_SENGLANGUAGE; /* suppress country */
}
else
{
if (!SUBLANGID(Locale)) {
TRACE("SUBLANGID missing in 0x%04x\n", Locale);
return E_FAIL;
}
}
pRfc1766Info->lcid = Locale;
pRfc1766Info->wszRfc1766[0] = 0;
pRfc1766Info->wszLocaleName[0] = 0;
if ((!lcid_to_rfc1766W(Locale, pRfc1766Info->wszRfc1766, MAX_RFC1766_NAME)) &&
(GetLocaleInfoW(Locale, type, pRfc1766Info->wszLocaleName, MAX_LOCALE_NAME) > 0))
return S_OK;
/* Locale not supported */
return E_INVALIDARG;
} }
static HRESULT WINAPI fnIMultiLanguage_CreateConvertCharset( static HRESULT WINAPI fnIMultiLanguage_CreateConvertCharset(
......
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