Configure TempDefautLocaleSetter
If `locale_t` support is not available, set temporarily the locale using the locale name of this instance.
This commit is contained in:
parent
e0e34fcb1f
commit
443c2f4339
1 changed files with 3 additions and 1 deletions
|
|
@ -352,7 +352,7 @@ wxUILocaleImplUnix::InitLocaleNameAndCodeset() const
|
|||
// If extended locale support is not available, we need to temporarily
|
||||
// switch the global locale to the one we use.
|
||||
#ifndef HAVE_LOCALE_T
|
||||
TempDefautLocaleSetter setDefautLocale(LC_CTYPE);
|
||||
TempDefautLocaleSetter setDefautLocale(LC_CTYPE, m_locId.GetName());
|
||||
#endif
|
||||
|
||||
#ifdef _NL_LOCALE_NAME
|
||||
|
|
@ -400,6 +400,8 @@ wxUILocaleImplUnix::GetLangInfo(nl_item item) const
|
|||
// We assume that we have nl_langinfo_l() if we have locale_t.
|
||||
if ( m_locale )
|
||||
return nl_langinfo_l(item, m_locale);
|
||||
#else
|
||||
TempDefautLocaleSetter setDefautLocale(LC_CTYPE, m_locId.GetName());
|
||||
#endif // HAVE_LOCALE_T
|
||||
|
||||
return nl_langinfo(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue