Set C locale for wxLANGUAGE_DEFAULT under Unix too
This had been done before all the recent wxUILocale-related changed and was still done for non-Unix systems, but not there because we explicitly skipped calling setlocale() in this case with a comment saying that the default locale was already in use -- however this comment was wrong and we do need to call setlocale(LC_ALL, "") in this case for compatibility and consistency. Closes #22212.
This commit is contained in:
parent
af9e7fd460
commit
4a9da949ce
@ -258,12 +258,9 @@ wxUILocaleImplUnix::~wxUILocaleImplUnix()
|
||||
void
|
||||
wxUILocaleImplUnix::Use()
|
||||
{
|
||||
if ( m_locId.IsEmpty() )
|
||||
{
|
||||
// This is the default locale, it is already in use.
|
||||
return;
|
||||
}
|
||||
|
||||
// Note that we don't need to test if m_locId is not empty here, as we
|
||||
// still want to call setlocale() with the empty string to use the default
|
||||
// locale settings in this case.
|
||||
if ( !wxSetlocaleTryAll(LC_ALL, m_locId) )
|
||||
{
|
||||
// Some C libraries (namely glibc) still use old ISO 639,
|
||||
|
Loading…
Reference in New Issue
Block a user