Resource Cultue question (ASP.NET 2.0)

G

Griff

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top