Esempio n. 1
0
// caller needs to free() the result
WCHAR *GetLanguageName(int langIdx)
{
    assert(IsValidLangIdx(langIdx));
    if (!IsValidLangIdx(langIdx))
        return NULL;
    return str::conv::FromUtf8(gLangData[langIdx].fullName);
}
Esempio n. 2
0
bool IsLanguageRtL(int langIdx)
{
    assert(IsValidLangIdx(langIdx));
    if (!IsValidLangIdx(langIdx))
        return false;
    return gLangData[langIdx].isRTL;
}
Esempio n. 3
0
// checks whether the language code is known and returns
// a static pointer to the same code if so (else NULL)
const char *ValidateLanguageCode(const char *code)
{
    int index = GetLangIndexFromCode(code);
    if (IsValidLangIdx(index))
        return gLangData[index].code;
    return NULL;
}
Esempio n. 4
0
// caller MUST NOT free the result
const char *GetLanguageCode(int langIdx)
{
    if (!IsValidLangIdx(langIdx))
        return NULL;
    return gLangData[langIdx].code;
}