Solved

Languages in Windows

Posted on 2001-06-22
8
285 Views
Last Modified: 2010-04-02
I have application with resources in two languages. Under WinNT it works and the language of running application depends on regional settings. But under Win2000 it depends primary on OS language and not on regional settings. Why? How to do it?

for example:
A...first lang., B...second lang. in res.
OS        OS lang.  Regional set.   Lang. of running app.
WinNT     A         B               B
Win2000   A         B               A (!!!)
0
Comment
Question by:lonicekm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Expert Comment

by:robpitt
ID: 6217647
The language loading rules employed are indeed inconsistant and confusing.

That said it was my recollection that NT/2000 behaved in the same way and that it was

Win95/98 that were a bit odd.

Anyway a quick search of MSDN revealed the following which may of help:
http://support.microsoft.com/support/kb/articles/q169/4/83.asp
http://support.microsoft.com/support/kb/articles/q221/2/09.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnintl/html/s24b3_b.asp

Rob
0
 
LVL 1

Expert Comment

by:xutao
ID: 6218212
   I don't know what rule you use in your application to identify the lauguage for use.
    There are two international feature API for us to get the language identifier of the current user locale [GetUserDefaultLangID()] and the user default-locale identifier [GetUserDefaultLCID].
    Use them you can easily know which language to use, at least I did.
    Good luck.
0
 

Author Comment

by:lonicekm
ID: 6223489
I don't use any rule, it chooses the language automatically. Under WinNT it works as I want and I don't need any extra code. How can I ordain explicitly f.e. what language version of the same dialog use?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:robpitt
ID: 6223997
Oh my god! - I just did a little test and it would seem that the first link I posted ( http://support.microsoft.com/support/kb/articles/q169/4/83.asp ) is a blantent lie.

On my 2000 system "English US" resources allways seem to get loaded in preference to an exact Primary Lang / Sub lang match.

For example, if I set my regional settings are French France then English US still gets loaded in preference to French France.

However if I use English *UK* resources everything works as expected i.e. a best match is loaded.

Crazy.

Rob

0
 
LVL 1

Accepted Solution

by:
johnedwards2 earned 0 total points
ID: 6224183
Yeah there's defintely something fishy about the language loading stuff. Every time I think I understand it, I discover a scenario where it doesn't work as a I expect.

Alas the MSDN help and KB articles are very poor in this area.

Anyway the only reliable method I currently trust is to load the resources manualy using FindResourceEx but this is a real pain.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6820019
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "johnedwards2" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner

0
 

Expert Comment

by:ComTech
ID: 6837684
Question had been deleted when I came to award question.

ComTech
CS @ EE
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 6996976
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can i compile this github project?? 2 100
c++ reading data from file into two dimensional array 3 146
Why  my code (program) build with old compiler? 11 141
C++ Code Issue 4 47
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question