git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21099
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
See \helpref{AddLanguage}{wxlocaleaddlanguage} for the wxLanguageInfo
description.
+\membersection{wxLocale::GetLanguageName}\label{wxlocalegetlanguagename}
+
+\constfunc{static wxString}{GetLanguageName}{\param{int }{lang}}
+
+Returns English name of the given language or empty string if this
+language is unknown.
+
\membersection{wxLocale::GetLocale}\label{wxlocalegetlocale}
// Returns NULL if no info found, pointer must *not* be deleted by caller
static const wxLanguageInfo *GetLanguageInfo(int lang);
+ // Returns language name in English or empty string if the language
+ // is not in database
+ static wxString GetLanguageName(int lang);
+
// Find the language for the given locale string which may be either a
// canonical ISO 2 letter language code ("xx"), a language code followed by
// the country code ("xx_XX") or a Windows full language name ("Xxxxx...")
return NULL;
}
+/* static */
+wxString wxLocale::GetLanguageName(int lang)
+{
+ const wxLanguageInfo *info = GetLanguageInfo(lang);
+ if ( !info )
+ return wxEmptyString;
+ else
+ return info->Description;
+}
+
/* static */
const wxLanguageInfo *wxLocale::FindLanguageInfo(const wxString& locale)
{