added wxLocale::GetLanguageName
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -446,6 +446,13 @@ returned pointer is valid, the caller should {\it not} delete it.
|
||||
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}
|
||||
|
||||
|
@@ -455,6 +455,10 @@ public:
|
||||
// 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...")
|
||||
|
@@ -1448,6 +1448,16 @@ const wxLanguageInfo *wxLocale::GetLanguageInfo(int lang)
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user