Resource Cultue question (ASP.NET 2.0)

Discussion in 'ASP .Net' started by Griff, Feb 1, 2006.

  1. Griff

    Griff Guest

    I have attempted to replicate an example of using resource strings in a test
    application and I can't get it to work - I wonder whether someone could
    kindly point out where I've gone wrong...

    DEFAULT.ASPX
    This contains the following line:

    <%@ Page Culture="Auto" UICulture="Auto" Language="VB" Explicit="true"
    Strict="true" AutoEventWireup="false" CodeFile="Default.aspx.vb"
    Inherits="_Default" %>

    DEFAULT.ASPX.VB
    This contains the following event:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    Handles Me.Load

    Page.Title = Resources.defaultResource.Hello & " Griff"

    End Sub

    In the \APP_GLOBALRESOURCES folder I have two files:
    defaultResource.resx
    defaultResource.fi-FI.resx

    INTERNET EXPLORER 6 > LANGUAGES
    The top one is: "Finnish [fi]"

    IIS
    The web project is set to run under IIS, rather than the web server built
    into VS2005

    WHAT I'M EXPECTING TO HAPPEN
    When the default.aspx page loads, it uses the Culture="Auto" attribute (or
    the UICulture="Auto" attribute, not sure which) to auto-detect the language
    of my browser. Because I have the language set to Finnish it would use the
    "defaultResource.fi-FI.resx" file.

    WHAT HAPPENS
    It's getting the value from the defaultResource.resx file instead
     
    Griff, Feb 1, 2006
    #1
    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. Mike McCann
    Replies:
    1
    Views:
    7,906
  2. Dirc Khan-Evans
    Replies:
    1
    Views:
    901
    Karl Seguin
    Oct 17, 2005
  3. Fredrik Rodin
    Replies:
    2
    Views:
    4,951
    Fredrik Rodin
    Nov 4, 2005
  4. avishosh
    Replies:
    2
    Views:
    10,576
    avishosh
    Aug 8, 2004
  5. Heinrich Moser
    Replies:
    1
    Views:
    461
    Heinrich Moser
    Mar 27, 2008
Loading...

Share This Page