Thread View: borland.public.cppbuilder.internationalization
3 messages
3 total messages
Started by caleb
Mon, 03 Apr 2006 17:01
Regional Settings (Once or Lots)
Author: caleb
Date: Mon, 03 Apr 2006 17:01
Date: Mon, 03 Apr 2006 17:01
35 lines
1544 bytes
1544 bytes
Question -------- How can I change the regional settings -- that is just one time in the application? If I use: ShortDateFormat = "dd/mm/yyyy"; In one function does it have to be stated again in another f(); My problem ---------- If the user has the Windows regional settings to some other countries, then they receive an error message like: <___> is not a valid floating point number <___> is not a valid date and time My Question ----------- Can I set the variables like ShortDateFormat once only or do they have to be set in functions throughout the application? Please provide example if possible where you have an English (USA) code project that is used once or in every f(). Pardon my English. Thanks, Caleb
Re: Regional Settings (Once or Lots)
Author: caleb
Date: Mon, 03 Apr 2006 18:17
Date: Mon, 03 Apr 2006 18:17
58 lines
1955 bytes
1955 bytes
"caleb" <n@spam.com> wrote: > >Question >-------- > >How can I change the regional settings -- that is just one time >in the application? > >If I use: >ShortDateFormat = "dd/mm/yyyy"; > >In one function does it have to be stated again in another f(); > >My problem >---------- > >If the user has the Windows regional settings to some other >countries, then they receive an error message like: ><___> is not a valid floating point number ><___> is not a valid date and time > > >My Question >----------- > >Can I set the variables like ShortDateFormat once only or do >they have to be set in functions throughout the application? > >Please provide example if possible where you have an English >(USA) code project that is used once or in every f(). > >Pardon my English. > >Thanks, > >Caleb Hi: I tried : setlocale( LC_ALL , "English_United States.437" ); but the program still gave a not a valid floating point error. The field was "1,3" instead of "1.3" If I use : DecimalSeparator = '.'; Is it a permanent change or does the statement have to be repeated in each f() that has float values? Thank you Caleb
Re: Regional Settings (Once or Lots)
Author: Vladimir Stefanovic
Date: Tue, 04 Apr 2006 19:26
Date: Tue, 04 Apr 2006 19:26
15 lines
1286 bytes
1286 bytes
AFAIK, DecimalSeparator changes the separator on global app level, for example you can set it in constructor. -- Best Regards, Vladimir Stefanovic > If I use : > DecimalSeparator = '.'; > > Is it a permanent change or does the statement have to be > repeated in each f() that has float values?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads