Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

need Help with localization problem

0 views
Skip to first unread message

venky

unread,
May 21, 2002, 10:54:48 AM5/21/02
to
I am not able to display this properly. I am missing all
the special French characters like the special (e), etc

my IE Language setting is set to French and
English.French is on top (fr-FR)

My res files are genned as fp.resources and fp.fr-
FR.resources
The res file for english (fp.txt) reads
Year=year
Listen=listen
French=french

The one for french (fp.fr-FR.txt) reads
Year=année
Listen=écoutez
French=français


Here is my code
global.asax
---------
Sub Application_Start(ByVal sender As Object, ByVal e As
EventArgs)

' Fires when the application is started

Application("RM") =
ResourceManager.CreateFileBasedResourceManager("fp", _

Server.MapPath("resources") _

+ Path.DirectorySeparatorChar, _

Nothing)

End Sub

Sub Application_BeginRequest(ByVal sender As Object,
ByVal e As EventArgs)

' Fires at the beginning of each request

' For each request initialize the culture values with the

' user language as specified by the browser.

Try

Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(Request.UserLanguages
(0))

Catch

' provide fallback for not supported languages.

Thread.CurrentThread.CurrentCulture = New CultureInfo("en-
US")

End Try

Thread.CurrentThread.CurrentUICulture =
Thread.CurrentThread.CurrentCulture

Application("ci") =
Thread.CurrentThread.CurrentUICulture.Name

End Sub

-----

my webform1.asx code

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load

Response.Write("current culture info : " & Application
("ci"))

'Put user code to initialize the page here

Dim rm As ResourceManager

' Get the ResourceManager from the Application object.

rm = Application("RM")

TextBox1.Text = rm.GetString("Year",
Thread.CurrentThread.CurrentUICulture)

Label1.Text = rm.GetString("French",
Thread.CurrentThread.CurrentUICulture)

End Sub

--------

my output

current culture info : fr-FR
franais
anne

PLease note the missing french characters ...

0 new messages