Connecting Tech Pros Worldwide Forums | Help | Site Map

Multilanguage mathematical application and "," to "." conversion in Spanish in VB.NET

Newbie
 
Join Date: Jul 2008
Location: IN
Posts: 2
#1: Oct 19 '09
Hi Experts!
I am developing heavy mathematical engineering windows application in VB.NET (VS2005) with MSAccess Db. This application has resource files in English, Spanish and German Language. I have same setup to run in all these 3environment Windows XPs. In English, calculations are perfect; but in Spanish ',' is treated as '.' and '.' is treated as ',' e.g. 12.24 in EN is '12,24' in Spanish. I somehow managed to do it by manually replacing ',' by '.' and vice versa; but this is now not manageable since program is expading like anything. I saved number in DB while installing. User selects his language and so I check, if its Spanish, I explicitely replace "." in labels and text in TextBox to ",".
Please help me get this done. You will need Spanish locale XP and English locale XP to understand this problem.
Even in Spanish Office Excel (22/7) will come to (3,14)

Thanks for your help in advance.
With Regards,
Parag DI

tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,784
#2: Oct 19 '09

re: Multilanguage mathematical application and "," to "." conversion in Spanish in VB.NET


Ah the joys of globalization.
Hey, speeking of globalizating of globalization, there is an entire namespace dedicated to it.
http://msdn.microsoft.com/en-us/libr...alization.aspx

What you want to do is NOT hardcode values like the NumberDecimalCharacter, but instead get them from this namespace.
Newbie
 
Join Date: Jul 2008
Location: IN
Posts: 2
#3: 4 Weeks Ago

re: Multilanguage mathematical application and "," to "." conversion in Spanish in VB.NET


Thanks for your quick reply!!
This is great! Let me learn how to do this.
I will appreciate, if you can give me sample code, let it be for couple of labels which can change in English, Spanish and German language, please.
I have all 3 OS installed with my Virtual PC.
Thanks for your co-operation in advance..

With Regards,
Parag DI
Reply

Tags
multilanguage, spanish locale, vb.net