473,395 Members | 2,006 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,395 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 1669
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.