Re: Language Settings and Numbers

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: jack (jackn_at_systemsynergy.com.dumpthispart)
Date: 02/19/05


Date: Sat, 19 Feb 2005 17:04:15 -0500

Thank you very much!

"J French" <erewhon@nowhere.uk> wrote in message
news:421756ce.372507806@news.btclick.com...
> On Sat, 19 Feb 2005 09:47:33 -0500, "jack"
> <jackn@systemsynergy.com.dumpthispart> wrote:
>
>>Hello,
>>
>>I have a VB6 application that has been distributed worldwide. Because of
>>Windows XP language settings, in some locales the users use a comma as a
>>decimal place holder and a period as a thousands separator. This
>>application
>>must support the use of commas and periods in the English way and the way
>>I
>>just described.
>>
>>The primary issue I'm experiencing is with calculations. The numbers for
>>calculations are coming from a database of English values. So, an example
>>of
>>my issue is the app retrieves values of 10.1 and .1 from the database. The
>>calcuation that takes place is 10.1 - .1. In English, this simple math
>>equals 10. If a users language setting is Italian, the calculation is seen
>>by VB as 101 - 1 which of course equals 100.
>>
>>One solution I thought of is to replace commas and periods with the
>>correct
>>character based on the language setting. I'm a bit uncomfortable with this
>>because something is telling me it won't work in all circumstances.
>>
>>Is there anyway to force VB to see things in English when it comes to
>>calculations? Or, is there a conversion method to English from another
>>language?
>
> Just dont't use CStr - use Val
> - stuff Format - use Str$() and maybe some stuff on top
>
> Avoid all Locale aware conversions



Relevant Pages

  • Re: Language Settings and Numbers
    ... >must support the use of commas and periods in the English way and the way I ... >calculations are coming from a database of English values. ... If a users language setting is Italian, ...
    (microsoft.public.vb.general.discussion)
  • Language Settings and Numbers
    ... must support the use of commas and periods in the English way and the way I ... The primary issue I'm experiencing is with calculations. ... If a users language setting is Italian, ...
    (microsoft.public.vb.general.discussion)
  • Re: Number Form fields formatted as numbers - Word XP - Word 97
    ... I had an English version of Word 97. ... || that SUM did not work with Word 97 (French edition) because I had never ... the calculations are executed correctly. ... its commas replaced by spaces, ...
    (microsoft.public.word.docmanagement)
  • Re: Which or that
    ... of contemporary written and spoken English and they quite clearly point ... When do you use commas or not? ... I'll be happy if you can provide me with a single acceptable example in a modern English text where a relative clause introduced by "that" is enclosed in commas - by saying "acceptable" I mean I'd like to exclude any examples where the author clearly doesn't understand the proper usage of commas. ... One final general comment - a lot of heat is generated in many of these discussions where questions of style are confused with questions of grammar. ...
    (uk.culture.language.english)
  • Re: Missing Diction in Word
    ... doesn't catch misspelled words" then it wasn't going to help anyhow. ... > difficulties with the Dictionaries in Word. ... > Mac 2004 is an incorrect language setting especially when a file crosses ... > derivations of the English language: ...
    (microsoft.public.mac.office.word)