473,761 Members | 10,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with satellite library

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 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
Nov 23 '05 #1
2 1529
Fabrice:
I always let Vs.Net compile/generate my resx files, but I still think I see
the problem, as it's a very common one.

Dim rm As ResourceManager = New ResourceManager ("strings",
System.Reflecti on.Assembly.Get ExecutingAssemb ly())

I'm almost sure this line above is incorrect.

It should be "DefaultProject Namespace.strin g", System.Reflecti on...

resources automatically inherit the default namespace ofthe project :)

Also, unless I'm mistaken, you need to set the CurrentUICultur e. Actually
you should set both CurrentCulture and CurrentUICUltur e, but it's
specifically the CurrentUICultur e which the resource manager works against.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"fabrice" <em******@test. com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
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 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

Nov 23 '05 #2
Hello Karl

Thanks for your answer.
and yes....i have just set the UIculture. And great ! it works. That was the
problem.

My new code is my global.asax

Dim ci As New CultureInfo("en-GB")
Thread.CurrentT hread.CurrentCu lture = ci
---> System.Threadin g.Thread.Curren tThread.Current UICulture = ci
ci=CultureInfo. CurrentCulture

But for the part,
Dim rm As ResourceManager = New ResourceManager ("strings",
System.Reflecti on.Assembly.Get ExecutingAssemb ly())...
It works fine. so .... i don't touch !

thanks a lot.
Have a nice day.

fabrice
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> a
écrit dans le message de news: eW************* *@TK2MSFTNGP14. phx.gbl... Fabrice:
I always let Vs.Net compile/generate my resx files, but I still think I
see the problem, as it's a very common one.

Dim rm As ResourceManager = New ResourceManager ("strings",
System.Reflecti on.Assembly.Get ExecutingAssemb ly())

I'm almost sure this line above is incorrect.

It should be "DefaultProject Namespace.strin g", System.Reflecti on...

resources automatically inherit the default namespace ofthe project :)

Also, unless I'm mistaken, you need to set the CurrentUICultur e. Actually
you should set both CurrentCulture and CurrentUICUltur e, but it's
specifically the CurrentUICultur e which the resource manager works
against.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"fabrice" <em******@test. com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
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 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


Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1642
by: Kaan ?cg?n | last post by:
Hello NG, we have created a database for our schedules on the SQL server 2000. As we have many satellite stations, we created a merge publication. The aim of this merge publication is to provide the satellite stations with their "own" databases, in which they can alter their data and are able to synchronise with the main server thereafter. At the same time it is possible to enter data into the main server (in our main office). The...
1
6934
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while compiling the Max.UI.Win project with the following error Satellite assemblies could not be built because the main project output is missing.
6
3180
by: James | last post by:
I have two question regarding the version resource that is generated for a satellite assembly. 1) I have a file in my C# console app project called StringResources.en-US.resx. When I build the project, a satellite assembly is built and placed in the appropriate subfolder (en-US). The satellite assembly has a version #, however, none of the other version information that is part of the main app (set in AssemblyInfo.cs) is passed into...
2
14851
by: Dan | last post by:
I am creating a c# class library project to be used by some exe clients. This library needs to be localized for its text messages using satellite resource-only assemblies; I have created the library with an embedded resource for the default language and a sample satellite assembly with strings for another language, plus a dummy test client application, but the library always falls back to the default resources. Here's what I do: could...
5
10058
by: Rudolf Ball | last post by:
Dear NG, i want to load a plugin (WinForm) in my Applikation. That works fine. Now I want to globalize that plugin. So I have to load the Satellite Assembly, as well. But how can I load this (and when?). Thank you very much Rudi
1
2324
by: Bilal Farooq via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Bilal Farooq Hi, I have following requirements to achieve: I have some images andI am adding them as a resource to a dll. This dll is then to beused for getting those images by the other clients. Now to do so first I generated a .resx file which includes allthese images in the xml form. Then I convernted .resx to.resource file using resgen.exe. After this I used al.exe...
3
1682
by: Adam Calderon | last post by:
In ASP.NET 2.0 you have the choice of using the built in App_GlobalResoruces or App_LocalResources style of using resources or you can use your own resources utilizing satellite assemblies. In the SDK under "Resources in ASP.NET Applications" the documentation demonstrates how to use your own satellite assemblies and instructs you to build a folder structure under the bin folder. Following all of the correct procedures (taking an resx file...
0
1163
by: mastern200 | last post by:
I need to make a program where: In this program you MUST use the following functions and header file (library function): • #include<cmath > • fabs • pow • sqrt You run a company that ships satellite dishes to customers. The satellite dish is ordered based on the area of its opening (in square inches):
6
2034
by: Pep | last post by:
Firstly, I'm not sure if this is the right group for this query, so please forgive me if I am wrong. My problem is that most users I distribute my software to cannot install it on their systems due to not having the correct administrator rights. I'm perplexed over this as I cannot reasonably ask corporations to allow the local secretary to have admin or power user rights just to install my software. My software is intended for user...
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.