473,411 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

How to get Windows UI language?

Hi!

I need to know which language version of Windows user is using, how to
get it? In my case I need to know is Windows in english or finnish only.

--
Thanks in advance!

Mika
Nov 30 '05 #1
3 5967
Mika,

I don't know what (language) Windows version the user is using, however you
can find what is his setting for the culture to use.

System.Globalization.CultureInfo.CurrentCulture

or this one

http://msdn.microsoft.com/library/de...lturetopic.asp

(I thougth that the language version was just a version number)

However why do you need it? Normally all things should be done by the
globalization automaticly in Net.

I hope this helps you sofar,

Cor

"Mika M" <ma***************@luukku.com> schreef in bericht
news:eW**************@tk2msftngp13.phx.gbl...
Hi!

I need to know which language version of Windows user is using, how to get
it? In my case I need to know is Windows in english or finnish only.

--
Thanks in advance!

Mika

Nov 30 '05 #2
In fact the problem in my case is reading CSV-file using OLEDB provider.
Some of the computers at my customer are using english version Win
XP or Win 2000 and others finnish version of these Windowses.

English version Windowses can't read CSV file because the field
separator is ";". I quickly solved this problem for english windowses in
my application that it checks the separator first, and if separator is
";" then application makes new file into temporary files replacing ";"
into "," - and uses it because it works fine. However when Windows is
finnish version, then separator ";" works directly, so temporary file is
not needed.

I should quickly solve this separator problem somehow that same
application could work both (all) Windows language versions. Any better
suggestions than check UI language?

--
Mika

Cor Ligthert [MVP] wrote:
Mika,

I don't know what (language) Windows version the user is using, however you
can find what is his setting for the culture to use.

System.Globalization.CultureInfo.CurrentCulture

or this one

http://msdn.microsoft.com/library/de...lturetopic.asp

(I thougth that the language version was just a version number)

However why do you need it? Normally all things should be done by the
globalization automaticly in Net.

I hope this helps you sofar,

Cor

"Mika M" <ma***************@luukku.com> schreef in bericht
news:eW**************@tk2msftngp13.phx.gbl...
Hi!

I need to know which language version of Windows user is using, how to get
it? In my case I need to know is Windows in english or finnish only.

--
Thanks in advance!

Mika


Nov 30 '05 #3
Mika,

Good reason, I should have know this one, I see now that I showed you even
the wrong one.
Can you try this code. If you know that it is an CSV with a true comma.

\\\
Threading.Thread.CurrentThread.CurrentCulture = _
New Globalization.CultureInfo.InvariantCulture 'En-*'

'do your job with the CSV file with the comma

'And set the culture back with
Threading.Thread.CurrentThread.CurrentCulture = _
Globalization.CultureInfo.InstalledUICulture
///

I hope this helps,

Cor
Nov 30 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: inquirydog | last post by:
Hello- I, the inquirydog, would like to solicit suggestions for a new web page I am making: I am creating a simple website that will translate concepts between windows os's, Linux, and the...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
16
by: Robert Mark Bram | last post by:
Hi All! Is there a way to reference a window by name without doing something like this: open (, 'windowName'); The open method will open a blank window if there is no window with such a name....
12
by: Herr Lucifer | last post by:
It is a long time now that I am using "Dependency Walker for Win32" and navigating through different Dlls in "System32" folder to find my target API functions. The thing I have noticed is that,...
32
by: cat_dog_ass | last post by:
I am used to programming in DOS mode via Borland C++. I would now like to create programs for the Windows envirinment. Is it absoultely necessary to use Visual C++ to do this? Are there other tools...
7
by: lvpaul | last post by:
Hallo ! I am using IIS-Windows-Authentication in my intranet (web.config <authentication mode="Windows" /> <identity impersonate="true" /> How can I get the users (client) IP-Address ? I...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
69
by: Peter Olcott | last post by:
Does JavaScript represent its controls internally as Microsoft Windows controls, or does it build them from scratch like Java?
113
by: dan | last post by:
For writing a Windows desktop application, how much harder is it to use the Windows C API than C#/.NET, assuming the coding is done in an editor? What specific aspects were more difficult? I'm...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.