I'm trying to use wxLocale, just with the defaults, so the system's locale is used. I need that mainly for number formatting.
The problem is, if the program runs on a Hebrew locale the window controls are switched right to left and the menu appears on the right. I don't want this to happen, I just want numbers to be formatted correctly. How can I control this?
(Running on Windows 7, by the way. I'm not sure if this problem is Windows specific or not.)
How do I use wxLocale without changing window direction?
Re: How do I use wxLocale without changing window direction?
What I ended up doing is:
Seems to work. If there's any simpler (or more correct) way to do it, let me know.
Code: Select all
const wxLanguageInfo * locale = wxLocale::GetLanguageInfo(wxLocale::GetSystemLanguage());
wxLanguageInfo localeL2R = *locale;
localeL2R.Language = wxLANGUAGE_USER_DEFINED;
localeL2R.LayoutDirection = wxLayout_LeftToRight;
wxLocale::AddLanguage(localeL2R);
m_locale.Init(wxLANGUAGE_USER_DEFINED);