I nedd help to create and use Library Satellite.
I'm using Web Form under framework 1.1 and VB.NET
I'm not using Visual Studio.
I'd like to internationaliz e my web application with using .DLL
For the moment i test many solutions with one .aspx page to create a model.
But i'm not.
I m able to create and use .resource file and to get text for my Control.
But i'd like to pass to the next step that is to say ... to use DLL and
subdirectory in the directory \BIN of my web application.
But i nedd help, i'm lost.
These is my steps, but the method doesn't work.
I have one file index.aspx with the code behind file index.aspx.vb
Steps :
1- creating.. text files
---------------------------------
strings.txt -> langue par défaut
strings.en-NZ.txt > version en-NZ
2- then, .resource files :
------------------------------------------
resgen strings.txt strings.resourc es
resgen strings.en-NZ.txtstrings.r esources
3- compilation of the file : index.aspx.vb embeded wtih default resource
file : strings.resourc es
----------------------------------------------------------------------------------------------
vbc /t:library /r:system.web.dl l /r:system.dll /r:System.Data.d ll
/res:strings.res ources index.aspx.vb
I get a .DLL and if i copy the file in \BIN directory, all is ok and i have
the differents texts (default languauge).
4- Then, i want en-NZ language
------------------------------------------
compilation of the satellite assembly withe the command :
al /t:lib /culture:en-NZ /embed:strings.e n-NZ.resources
/out:index.aspx. resources.dll
I have created the subdirectory en-NZ in the directory \BIN and copied the
new file index.aspx.reso urces.dll.
5 - Test and out :
----------------------
To testingfor testing the language, i'm using global.asax with "Sub
Application_Beg inRequest" with the following Code :
Dim ci As New CultureInfo("en-NZ")
Thread.CurrentT hread.CurrentCu lture = ci
ci=CultureInfo. CurrentCulture
The new culture in the page index.aspx is en-NZ. But nothing works ! i have
always the default language !! I don't understand....
The is my code in the code behin file index.aspx.vb to retrieve the text :
Dim rm As ResourceManager = New ResourceManager ("strings",
System.Reflecti on.Assembly.Get ExecutingAssemb ly())
usernameLabel.T ext = rm.GetString("U sername")
passwordLabel.T ext = rm.GetString("P assword")
login.Text = rm.GetString("L ogin")
Thanks for you help.
fabrice