[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Trivial resources problem (beginner

owr

10/2/2003 1:06:00 AM

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.


3 Answers

Dmitriy Lapshin

10/2/2003 10:47:00 AM

0

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/default.asp?url=/library/en-us/cpguide/html/cpconbestpracticesforglobalapplication...

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

"Larry Smith" <_no_spam@nospam.com> wrote in message
news:ucSZDFIiDHA.2212@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.
>
>

owr

10/2/2003 6:38:00 PM

0

> 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/default.asp?url=/library/en-us/c...
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?


sdmanson

10/2/2003 10:56:00 PM

0

"Larry Smith" <_no_spam@nospam.com> wrote in message news:<uVCguQRiDHA.2500@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/default.asp?url=/library/en-us/c...
> 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.