473,785 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1702
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 CurrentUICultur e - 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******@nospa m.com> wrote in message
news:uc******** ******@TK2MSFTN GP09.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 CurrentUICultur e - 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/cpconbestpracti cesforglobalapp licationdesign. asp

Thanks for the feedback. I am aware of the "CultureInf o" 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******@nospa m.com> wrote in message news:<uV******* *******@TK2MSFT NGP09.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 CurrentUICultur e - 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/cpconbestpracti cesforglobalapp licationdesign. asp

Thanks for the feedback. I am aware of the "CultureInf o" 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
3491
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 within a try statement myself, or is there some clever implementation enhancement which makes this a bad idea? i.e. should I prefer: if hasattr(self,"datum"): datum=getattr("datum") else: datum=None
3
1324
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 start. I usually do best with a high quality book so if there are any really great books you can recommend I would appreciate it. Secondly, I need to find an editor similar to XMLFox for editing some
9
1615
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. -Separate section about the Thinking in C++ books now. -C++ Programming in Easy Steps was removed from the beginners' list. Not a bad book, but others are better. -You Can Do It! by Francis Glassborow added to the beginner books based on
3
1639
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 other language. Thanks in advance, Amrish
3
1009
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 (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...
6
1069
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
1418
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 the user about the data and then do some operations like sorting etc. I decided to use a linked list. The code looks as follows: #include<stdio.h> #include<string.h> #include<stdlib.h>
4
1582
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 machine and it works. I would also ask about creating installation package so that others could install my application. Best Regard
12
2492
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 http://en.wikipedia.org/wiki/Regular_expression http://www.regular-expressions.info/javascript.html http://www.webreference.com/js/column5/
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10330
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10153
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8976
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.