Search found 242 matches

by Natulux
Wed Oct 27, 2021 2:14 pm
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Microsoft deprecated the numeric language code identifiers (LCIDs). In the introduction of the [MS-LCID]-document that can be downloaded from Microsoft it reads: This document provides an overview of language code identifiers (LCIDs), also known as culture identifiers, which are being deprecated, a...
by Natulux
Wed Oct 27, 2021 11:26 am
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Thank you very much, you have been very helpful :-) Cheers Natulux EDIT: And in the .cpp is the answer for German(Belgium) and German(Italy): LNG(wxLANGUAGE_GERMAN_BELGIUM, "de_BE", 0 , 0 , wxLayout_LeftToRight, "German (Belgium)") de_be language and sublanguage are set to 0 and ...
by Natulux
Wed Oct 27, 2021 9:39 am
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

So you are saying that the language might be a combination of the display language and the region? Yes, I think so. For example, there are major differences between Portuguese as spoken in Portugal vs Portuguese as spoken in Brazil. So, only the combination of language and region uniquely identifie...
by Natulux
Wed Oct 27, 2021 9:17 am
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Btw: English (United States) is not properly used in older wxWidget Versions, but it is in wxWidgets 3++ Sry that I brought that up. Nothing is more unappealing than fiddling with long fixed issues ;-) My fix in the still not updated apps: bool LanguageTranslation::IsEnglish() { return (m_lang >= wx...
by Natulux
Wed Oct 27, 2021 8:35 am
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

I'd rather use GetSystemDefaultLocaleName instead of wxLocale::GetSystemLanguage, because it seems to return the "display language" instead of the "regional format" language. As I already explained in a prior post the behaviour you experience is most likely caused by the way you...
by Natulux
Tue Oct 26, 2021 8:50 am
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Out of curiosity, if you are using wxWidgets master (probably not?): What does wxUILocale::GetCurrent().GetName(); return? Hey PB, you are right, I dont have the master. I am working mostly with wx3.1.1, because I had trouble updating to 3.1.3 and dropped the issue back then. I dont have a "ui...
by Natulux
Mon Oct 25, 2021 3:33 pm
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

I lost my first answer, so this naturally is a little bit shorter ;-) Hm, the function GetSystemDefaultLocaleName belongs to the Windows system API. The problem is that this function returns the locale string in a form that is not understood by method wxLocale::FindLanguageInfo . For example, for a ...
by Natulux
Wed Oct 20, 2021 2:49 pm
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Hey Ulrich, I tried to use a snippet from your code but for me it does not seem to work. Maybe its my system (Windows10x64, wxWIdgets 3.1.1) My code wxString sSystemLocaleName; wchar_t buffer[1024]; GetSystemDefaultLocaleName(buffer, _countof(buffer)); sSystemLocaleName << buffer; wxMessageBox(sSyst...
by Natulux
Wed Oct 20, 2021 9:42 am
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Hey You can give the user an option to select any language he wants. I think most applications do that. My Windows is German, but i still prefer an English GUI in most cases, because the German translation is often horrible. Yes, that is of course an option which I most likely will add additionally,...
by Natulux
Mon Oct 18, 2021 3:04 pm
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Re: Localization with current display language

Hey Max, I guess you are right. With further tests I found the setting that is needed for widgets to get the wanted language: Region must be "English" and voila: User language is recognized as english. I only wished I could read the system default language as well, because it is unintuitiv...
by Natulux
Mon Oct 18, 2021 1:15 pm
Forum: C++ Development
Topic: wxFileConfig error with encoding with BOM
Replies: 6
Views: 2620

Re: wxFileConfig error with encoding with BOM

Hey, late response. Sry.

The file is shared between many applications and only some of them are mine.
Notepad++ and "Convert to UTF-8" did the trick so far but I still hope for an auto encoding support in the future.

Cheers
Natulux
by Natulux
Mon Oct 18, 2021 1:09 pm
Forum: C++ Development
Topic: Localization with current display language
Replies: 21
Views: 7685

Localization with current display language

Hey, I tried to use localization as provided by wxWidgets. I use the code from the "internat" sample and it works for me (except that I tried to use the .mo file from the ressource which didnt work for me - but thats another issue). If I set the wxLanguage variable manually eg to wxLANGUAG...
by Natulux
Thu Sep 02, 2021 3:58 pm
Forum: C++ Development
Topic: wxFileConfig error with encoding with BOM
Replies: 6
Views: 2620

Re: wxFileConfig error with encoding with BOM

Hey doublemax, CR/LF after the BOM was actually just a guess, because the said something about not finding the "=" letter in the first line, which it should find, if the string were concatenated. Thanks for trying though. I will check that. But I cant remove it. If I alter the file at all,...
by Natulux
Wed Sep 01, 2021 1:09 pm
Forum: C++ Development
Topic: wxFileConfig error with encoding with BOM
Replies: 6
Views: 2620

Re: wxFileConfig error with encoding with BOM

Hey ONEEYEMAN, I can give you an example, even though the content of the INI file does not matter in this case, because most editors hide the BOM from you. But let me illustrate the problem. If I open my INI file, I see: [build] version=1.0.0.0 name=ReleaseBuild And that would be the same for all en...
by Natulux
Tue Aug 31, 2021 9:47 am
Forum: C++ Development
Topic: wxFileConfig error with encoding with BOM
Replies: 6
Views: 2620

wxFileConfig error with encoding with BOM

Hey, I recently dicovered that wxFileConfig (tested wx3.1.1 and below on Windows10x64) does not understand encoding with BOM. I have not given a specific encoding, so wxConvAuto() is used. Opening a ini file gives an error message, saying that it misses a " = " sign in the first line, whic...