Explicit Localization Syntax - One Works, Other Does Not

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXMgVw==?=, Jul 10, 2007.

  1. We have created two (2) global resource files in App_GlobalResouces:
    Global.resx
    Global.es-MX.resx

    In an ASP.NET page, we use two different syntaxes to set text on the page,
    depending upon the context.
    Syntax 1: <% =Resources.Global.QuickSearch%>
    Syntax 2: <%$Resources:Global, QuickSearch%>

    When we set our Thread.CurrentThread.CurrentUICulture and
    Thread.CurrentThread.CurrentCulture = new CultureInfo("es-MX"), those
    controls using syntax 1 display Spanish, but those displaying syntax 2 still
    display English.

    To create the Global.es-MX.resx file, we copied the Global.resx and modified
    the text. All of the keys are present. Also because of this, we thought if
    it were a key issue, then how is the English text being found?

    Any ideas on what we're doing wrong?
     
    =?Utf-8?B?Q2hyaXMgVw==?=, Jul 10, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Q2hyaXMgVw==?=

    Chris Walls Guest

    I thought I posted this with my MSDN user ID which I thought meant I should
    get a response from an MS Enginner within a few business days...


    "Chris W" <Chris > wrote in message
    news:D...
    > We have created two (2) global resource files in App_GlobalResouces:
    > Global.resx
    > Global.es-MX.resx
    >
    > In an ASP.NET page, we use two different syntaxes to set text on the page,
    > depending upon the context.
    > Syntax 1: <% =Resources.Global.QuickSearch%>
    > Syntax 2: <%$Resources:Global, QuickSearch%>
    >
    > When we set our Thread.CurrentThread.CurrentUICulture and
    > Thread.CurrentThread.CurrentCulture = new CultureInfo("es-MX"), those
    > controls using syntax 1 display Spanish, but those displaying syntax 2
    > still
    > display English.
    >
    > To create the Global.es-MX.resx file, we copied the Global.resx and
    > modified
    > the text. All of the keys are present. Also because of this, we thought
    > if
    > it were a key issue, then how is the English text being found?
    >
    > Any ideas on what we're doing wrong?
     
    Chris Walls, Jul 16, 2007
    #2
    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. Olivier Matrot

    ASP.NET 2.0 : Explicit localization expression

    Olivier Matrot, Aug 25, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,147
    Steven Cheng[MSFT]
    Aug 26, 2005
  2. Replies:
    1
    Views:
    389
  3. J.T. Conklin
    Replies:
    1
    Views:
    449
    David Hilsee
    Aug 11, 2004
  4. Chris Walls
    Replies:
    2
    Views:
    445
    Chris Walls
    Jul 20, 2007
  5. David Thielen

    implicit vs explicit localization

    David Thielen, Oct 17, 2006, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    647
    Steven Cheng[MSFT]
    Oct 20, 2006
Loading...

Share This Page