473,405 Members | 2,445 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,405 software developers and data experts.

Trivial resources problem (beginner)

I'm just doing some experimentation to learn the ins and outs of resources
in .NET and am having a minor problem (OS=Win2000). I've prepared both an
"en-US" subdirectory and an "en-CA" subdirectory (Canada) under my app's
main directory. Anyone know how to change the locale via the control panel
in order to pick up "en-CA". I just want to see this in action only. The
default culture is "en-US" so I have no problem retrieving a string from the
"en-US" subdirectory. However, after changing everything imaginable to
Canada in the control panel (under "Regional Options"), I can't make it pick
up the Canadian version of the string. The string still originates from
"en-US". Any ideas? Thanks.
Jul 21 '05 #1
3 1670
Larry,

You can programatically force a thread to use a particular culture. In
addition, I'd still like to stress the difference between the CurrentCulture
and CurrentUICulture - make sure you use the right one.

Here's an article that might help (mind the line wraps):

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

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Larry Smith" <_n******@nospam.com> wrote in message
news:uc**************@TK2MSFTNGP09.phx.gbl...
I'm just doing some experimentation to learn the ins and outs of resources
in .NET and am having a minor problem (OS=Win2000). I've prepared both an
"en-US" subdirectory and an "en-CA" subdirectory (Canada) under my app's
main directory. Anyone know how to change the locale via the control panel
in order to pick up "en-CA". I just want to see this in action only. The
default culture is "en-US" so I have no problem retrieving a string from the "en-US" subdirectory. However, after changing everything imaginable to
Canada in the control panel (under "Regional Options"), I can't make it pick up the Canadian version of the string. The string still originates from
"en-US". Any ideas? Thanks.


Jul 21 '05 #2
> Larry,

You can programatically force a thread to use a particular culture. In
addition, I'd still like to stress the difference between the CurrentCulture and CurrentUICulture - make sure you use the right one.

Here's an article that might help (mind the line wraps):

http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconbestpracticesforglobalapplicationdesign.asp

Thanks for the feedback. I am aware of the "CultureInfo" class and changing
things on the fly does pick up my Canadian string. I don't understand why it
doesn't work via the control panel however. I've made the appropriate change
(as best as I can tell) but it still picks up the U.S. string. Maybe it's
just the U.S. asserting its (usual) dominance over Canada :) Good thing it's
not a French or German string! Any ideas?
Jul 21 '05 #3
"Larry Smith" <_n******@nospam.com> wrote in message news:<uV**************@TK2MSFTNGP09.phx.gbl>...
Larry,

You can programatically force a thread to use a particular culture. In
addition, I'd still like to stress the difference between the

CurrentCulture
and CurrentUICulture - make sure you use the right one.

Here's an article that might help (mind the line wraps):

http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconbestpracticesforglobalapplicationdesign.asp

Thanks for the feedback. I am aware of the "CultureInfo" class and changing
things on the fly does pick up my Canadian string. I don't understand why it
doesn't work via the control panel however. I've made the appropriate change
(as best as I can tell) but it still picks up the U.S. string. Maybe it's
just the U.S. asserting its (usual) dominance over Canada :) Good thing it's
not a French or German string! Any ideas?

Possibly the control panel needs to reload the culture changes which
could mean a reboot. I have always wanted to know why an installing
program or changes to a desktop almost always require a reboot. If I
am out of line on my thinking I am sure someone will point out the
error of my ways.
Jul 21 '05 #4

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

Similar topics

25
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
3
by: jacksonaaronc | last post by:
Greetings, I am in need of two things. First, I need a list of good resources for someone that wishes to learn XML. If there are any defacto books, URL, etc I would love to know where to...
9
by: Stephen Tyndall | last post by:
This is the updated version of the resources list posted last month. Updates: -Now application-neutral. The old list had video game-related programming books. -Required reading section added....
3
by: bAmrish | last post by:
Hi guyz, I am new to PHP and I am considering buying a PHP book. Can you suggest me a book to start with which can be appropriate for PHP begniers. I have a pretty good programing experinence in...
3
by: Larry Smith | last post by:
I'm just doing some experimentation to learn the ins and outs of resources in .NET and am having a minor problem (OS=Win2000). I've prepared both an "en-US" subdirectory and an "en-CA" subdirectory...
6
by: rodchar | last post by:
hey all, i'm trying to wrap my ahead around java and .net working together. any good beginner resources? thanks, rodchar
7
by: alternativa | last post by:
Hello, I'm a beginner in C programming and I have a problem that probably will seem trivial to most of you, however I can't find a solution... So, I have to write a data base - program should ask...
4
by: Dariusz Tomon | last post by:
Hello I have got windows application project (C# Visual Studio 2003) with references to external dlls. All I want is to compile everything into one exe file, so that I can send it to another...
12
by: FAQEditor | last post by:
Anybody have any URL's to tutorials and/or references for Regular Expressions? The four I have so far are: http://docs.sun.com/source/816-6408-10/regexp.htm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.