Dot changed to a comma
Dot changed to a comma
Hi everybody.
Can someone explain me?
The program running under WinXP has a dot in the numbers
And the same program under Win8.1 has a comma
What can be done to have a dot in numbers and program running under Win8.1
Thank you
Win8.1
wxDev-C++ 7.4.2.569
Can someone explain me?
The program running under WinXP has a dot in the numbers
And the same program under Win8.1 has a comma
What can be done to have a dot in numbers and program running under Win8.1
Thank you
Win8.1
wxDev-C++ 7.4.2.569
Re: Dot changed to a comma
Hi,
I've just moved this topic from the wxDev-C++ subforum to here, since as far as I can tell it has nothing to do with the wxDev-C++ IDE. Please only post to the wxDev-C++ subforum when you have a question about wxDev-C++ itself e.g. how to make it do ${FOO}.
Regards,
David
I've just moved this topic from the wxDev-C++ subforum to here, since as far as I can tell it has nothing to do with the wxDev-C++ IDE. Please only post to the wxDev-C++ subforum when you have a question about wxDev-C++ itself e.g. how to make it do ${FOO}.
Regards,
David
Re: Dot changed to a comma
Some countries use "," instead "." as the decimal point.
Tim S.
Tim S.
Re: Dot changed to a comma
The application in the screenshot is in Slovak language, Slovak language uses decimal comma.
My guess would be that the XP computer has period set as a decimal separator in MS Windows, while the 8.1 one uses comma. Since the application probably uses wxLocale with the default language, the decimal separator is taken from the OS as expected.
My guess would be that the XP computer has period set as a decimal separator in MS Windows, while the 8.1 one uses comma. Since the application probably uses wxLocale with the default language, the decimal separator is taken from the OS as expected.
Re: Dot changed to a comma
wxLocale there I did notPB wrote:The application in the screenshot is in Slovak language, Slovak language uses decimal comma.
My guess would be that the XP computer has period set as a decimal separator in MS Windows, while the 8.1 one uses comma. Since the application probably uses wxLocale with the default language, the decimal separator is taken from the OS as expected.
The program leaves out certain letters in Slovak
But only winXp
In win8.1 are all letters
This also do not know why it does
- xaviou
- Super wx Problem Solver
- Posts: 437
- Joined: Mon Aug 21, 2006 3:18 pm
- Location: Annecy - France
- Contact:
Re: Dot changed to a comma
Hi.
A Quick trick is a call to setlocale(LC_NUMERIC, "C") witch will force decimals to use the point.
Regards
Xav'
A Quick trick is a call to setlocale(LC_NUMERIC, "C") witch will force decimals to use the point.
Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
Re: Dot changed to a comma
I am sorry, I do not understand. Are you trying to say that the application does not use wxLocale?palikem wrote:wxLocale there I did not
The program leaves out certain letters in Slovak
But only winXp
In win8.1 are all letters
This also do not know why it does
I see Slovak and English flags in the screenshot and I assumed it can switch the application language using those two icons.
Are you saying that the strings inside the application are hardcoded in Slovak, and not wrapped in _("") macro?
Did you check what is the decimal separator on the two computers set to in Windows settings?
Re: Dot changed to a comma
I thought mixing wxLocale and C locale functions was to be avoided?xaviou wrote:A Quick trick is a call to setlocale(LC_NUMERIC, "C") witch will force decimals to use the point.
Re: Dot changed to a comma
I do not use wxLocale
Yes, the language can be changed using the icon
I wanted to simplify it
But at the end I do complicated.
Now I miss the letters in winXP.
Yes, the language can be changed using the icon
I wanted to simplify it
Code: Select all
mfile[0] = _("File"); mfile[1] = _("Súbor");
mnew[0] = _("New"); mnew[1] = _("Nový");
mopen[0] = _("Open"); mopen[1] = _("Otvoriť");
msave[0] = _("Save"); msave[1] = _("Uložiť");
msaveas[0] = _("Save As"); msaveas[1] = _("Ulož ako");
mclose[0] = _("Close"); mclose[1] = _("Koniec");
mview[0] = _("View"); mview[1] = _("Vidieť");
Now I miss the letters in winXP.
Re: Dot changed to a comma
The problem with dots and commas, partially solved.xaviou wrote:Hi.
A Quick trick is a call to setlocale(LC_NUMERIC, "C") witch will force decimals to use the point.
Regards
Xav'
Code: Select all
locale = new wxLocale();
locale->Init(wxLANGUAGE_ENGLISH, wxLOCALE_LOAD_DEFAULT);
But it works.
Re: Dot changed to a comma
You are doing it wrong. The _("") macro is there to help with localization. The strings in the source should be only in English and POEdit or similar should be used to generate and translate message catalogues for other languages. Using non-English letters is also brittle (depends on the compiler and source file encoding) and is not recommended.palikem wrote:I do not use wxLocale
Yes, the language can be changed using the icon
I wanted to simplify it
But at the end I do complicated.Code: Select all
mfile[0] = _("File"); mfile[1] = _("Súbor"); mnew[0] = _("New"); mnew[1] = _("Nový"); mopen[0] = _("Open"); mopen[1] = _("Otvoriť"); msave[0] = _("Save"); msave[1] = _("Uložiť"); msaveas[0] = _("Save As"); msaveas[1] = _("Ulož ako"); mclose[0] = _("Close"); mclose[1] = _("Koniec"); mview[0] = _("View"); mview[1] = _("Vidieť");
Now I miss the letters in winXP.
- xaviou
- Super wx Problem Solver
- Posts: 437
- Joined: Mon Aug 21, 2006 3:18 pm
- Location: Annecy - France
- Contact:
Re: Dot changed to a comma
It is.PB wrote:I thought mixing wxLocale and C locale functions was to be avoided?xaviou wrote:A Quick trick is a call to setlocale(LC_NUMERIC, "C") witch will force decimals to use the point.
But it works And if he doesn't use wxLocale there shouldn't be any problem.
Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff