473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

string resources

Can someone explain how to get a .resx file (containing simple string
resources) into an assembly? This must be such a common requirement but I
have failed to find a simple guide. I have used 'resgen' to generate a
..resources file, but what is this 'al.exe' referred to in the documentation,
how should it be used to make a .dll and where do I find al.exe, it isn't in
my installation of VisualStudio? Or is there a simple way from within Visual
Studio, without resorting to difficult command-line applications?
Nov 16 '05 #1
2 2165
Hi,
Can someone explain how to get a .resx file (containing simple string
resources) into an assembly? This must be such a common requirement but I
have failed to find a simple guide. I have used 'resgen' to generate a
.resources file, but what is this 'al.exe' referred to in the documentation,
how should it be used to make a .dll and where do I find al.exe, it isn't in
my installation of VisualStudio? Or is there a simple way from within Visual
Studio, without resorting to difficult command-line applications?


resgen: you did it absolutely correctly, now move on with the al.exe,
which links the resource files into an assembly:
the al.exe is here (depending on your framework version):
c:\windows\Microsoft.NET\Framework\v1.1.4322\al.ex e
To create language files, I normally have 1 .bat file for executing the
language files by a simple double click, and 1 .txt file for each
language, which is the configuration for the language:

* create_language.bat :
al @de.txt
al @fr.txt
and in de.txt/fr.txt (change culture and out-param for each language):
/t:lib
/embed:myresourcefile.resources
/culture:de
/out:../bin/Debug/de/MyProgramName.resources.dll
/template:../bin/Debug/MyProgramName.exe
note: you must compile the main .resource file (for me, it's mostly the
english language) with the .exe, which is the main program file.

hth
Markus

--
http://thoean.com
Nov 16 '05 #2
Thnaks Markus,

That has sorted it.
I was looking in VS for al.exe, not in .NET. So now I can see all the
command line options for it.
I didn't need the foreign language options (just the default resources),
since I am using a third-party tool for internationalization..
I'm still puzzled why there's no built-in tool (with VS) to do this common
operation!

"Markus Thurner" wrote:
Hi,
Can someone explain how to get a .resx file (containing simple string
resources) into an assembly? This must be such a common requirement but I
have failed to find a simple guide. I have used 'resgen' to generate a
.resources file, but what is this 'al.exe' referred to in the documentation,
how should it be used to make a .dll and where do I find al.exe, it isn't in
my installation of VisualStudio? Or is there a simple way from within Visual
Studio, without resorting to difficult command-line applications?


resgen: you did it absolutely correctly, now move on with the al.exe,
which links the resource files into an assembly:
the al.exe is here (depending on your framework version):
c:\windows\Microsoft.NET\Framework\v1.1.4322\al.ex e
To create language files, I normally have 1 .bat file for executing the
language files by a simple double click, and 1 .txt file for each
language, which is the configuration for the language:

* create_language.bat :
al @de.txt
al @fr.txt
and in de.txt/fr.txt (change culture and out-param for each language):
/t:lib
/embed:myresourcefile.resources
/culture:de
/out:../bin/Debug/de/MyProgramName.resources.dll
/template:../bin/Debug/MyProgramName.exe
note: you must compile the main .resource file (for me, it's mostly the
english language) with the .exe, which is the main program file.

hth
Markus

--
http://thoean.com

Nov 16 '05 #3

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

Similar topics

2
by: Sam Martin | last post by:
from a resource file. Hi all, Im having a bit of a moment. I've got resource files in each of my assemblies, just named like "Labels.resources" for example. I've got a commond base...
1
by: Marco Gerlach | last post by:
Hello, on one of our customers servers we get following error on first ASPX-page: An error occurred while try to load the string resources (GetModuleHandle failed with error -2147023888) ...
1
by: theintrepidfox | last post by:
Dear Group I'd be grateful if one of you can help me out with the following. I'd like to load a resource string dynamically e.g. Resources.Default.aspx.mnuNavigation1 should load the...
3
by: groovyjman21 | last post by:
Hi all, Can someone just give me a dead-simple example of how to find, read, and use resource files from C# using the VS2005 IDE? I need to call some strings from a resource file and am having...
2
by: JB | last post by:
Hi All, I'm using the Application's Resources to store Strings (right click on the Application, Properties, Resources). There are quite a lot of Strings in there. Today I've just added another...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.