MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / LocalizedLanguageName

Function LocalizedLanguageName

src/utils.cpp:264–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264wxString LocalizedLanguageName(wxString const& lang) {
265 icu::Locale iculoc(lang.c_str());
266 if (!iculoc.isBogus()) {
267 icu::UnicodeString ustr;
268 iculoc.getDisplayName(iculoc, ustr);
269#ifdef _MSC_VER
270 return wxString((const wchar_t*)ustr.getBuffer());
271#else
272 std::string utf8;
273 ustr.toUTF8String(utf8);
274 return to_wx(utf8);
275#endif
276 }
277
278 if (auto info = wxLocale::FindLanguageInfo(lang))
279 return info->Description;
280 return lang;
281}

Callers 2

GetLanguagesMenuMethod · 0.85
PickLanguageMethod · 0.85

Calls 2

wxStringClass · 0.70
to_wxFunction · 0.70

Tested by

no test coverage detected