F
fabrice
hello,
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 internationalize 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.resources
resgen strings.en-NZ.txtstrings.resources
3- compilation of the file : index.aspx.vb embeded wtih default resource
file : strings.resources
----------------------------------------------------------------------------------------------
vbc /t:library /r:system.web.dll /r:system.dll /r:System.Data.dll
/res:strings.resources 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
------------------------------------------
al /t:lib /culture:en-NZ /embed:strings.en-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.resources.dll.
5 - Test and out :
----------------------
To testingfor testing the language, i'm using global.asax with "Sub
Application_BeginRequest" with the following Code :
Dim ci As New CultureInfo("en-NZ")
Thread.CurrentThread.CurrentCulture = 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.Reflection.Assembly.GetExecutingAssembly())
usernameLabel.Text = rm.GetString("Username")
passwordLabel.Text = rm.GetString("Password")
login.Text = rm.GetString("Login")
Thanks for you help.
fabrice
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 internationalize 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.resources
resgen strings.en-NZ.txtstrings.resources
3- compilation of the file : index.aspx.vb embeded wtih default resource
file : strings.resources
----------------------------------------------------------------------------------------------
vbc /t:library /r:system.web.dll /r:system.dll /r:System.Data.dll
/res:strings.resources 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
------------------------------------------
al /t:lib /culture:en-NZ /embed:strings.en-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.resources.dll.
5 - Test and out :
----------------------
To testingfor testing the language, i'm using global.asax with "Sub
Application_BeginRequest" with the following Code :
Dim ci As New CultureInfo("en-NZ")
Thread.CurrentThread.CurrentCulture = 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.Reflection.Assembly.GetExecutingAssembly())
usernameLabel.Text = rm.GetString("Username")
passwordLabel.Text = rm.GetString("Password")
login.Text = rm.GetString("Login")
Thanks for you help.
fabrice