Trivial resources problem (beginner)

Discussion in 'ASP .Net' started by Larry Smith, Oct 2, 2003.

  1. Larry Smith

    Larry Smith Guest

    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.
    Larry Smith, Oct 2, 2003
    #1
    1. Advertising

  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/d...onbestpracticesforglobalapplicationdesign.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" <> wrote in message
    news:...
    > 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.
    >
    >
    Dmitriy Lapshin [C# / .NET MVP], Oct 2, 2003
    #2
    1. Advertising

  3. Larry Smith

    Larry Smith Guest

    > 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/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?
    Larry Smith, Oct 2, 2003
    #3
  4. Larry Smith

    Scott Manson Guest

    "Larry Smith" <> wrote in message news:<>...
    > > 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/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.
    Scott Manson, Oct 2, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russell E. Owen
    Replies:
    0
    Views:
    692
    Russell E. Owen
    Sep 8, 2006
  2. Zahpod
    Replies:
    4
    Views:
    656
    Zahpod
    Apr 21, 2006
  3. baibaichen

    trivial or non-trivial object

    baibaichen, Jan 12, 2006, in forum: C++
    Replies:
    3
    Views:
    883
    osmium
    Jan 12, 2006
  4. rogo
    Replies:
    11
    Views:
    528
    Jim Langston
    Nov 3, 2007
  5. David Villa
    Replies:
    9
    Views:
    131
    David Villa
    Dec 23, 2009
Loading...

Share This Page