Solved

Languages in Windows

Posted on 2001-06-22
8
284 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

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!

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

763 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