Localization: neutral language out of main assembly

H

Hannes Schmiderer

We have to support different languages in our application. We do not
want to compile the whole application if anything changes in the text
of the pages.

With satellite assemblies this is possible easily. We change the .resx
XML-resource-file, run resgen.exe and al.exe and we have a new dll.

But how is this possible with the neutral/default/fallback language
resource which is integrated in the main assembly?

Can it be removed out of the main assembly that we can create it like
the satellite assemblies? Maybe somehow with al.exe and the /link
option?

Or can the text be changed in the main assembly without recompiling
the code?

thanks, Hannes
 
F

Frank Drebin

In the old days (like in VB) you could create a "string table" that would
have a version of all your strings, in each language that you needed.

So instead of having the "File" and "Exit" menus.. they would just be ID 100
and 130 for example. At run time, you detect thier locale settings and show
the appropriate ID from the string table.

I looked around, and didn't find an equivalent - but this was a good idea
and it seems that this really should've been upgraded with VS.NET??
 
M

MS News \(MS ILM\)

The way I understand it: This is by design. Correct me if I am wrong
Assemblies are referenced in such a way so the Logical/Virtual Assembly file
knows where everything is.
So if you change one assembly your are breaking some refrences. dependencies
and hashes??
It looks like you have to recompile.
no tampering is allowed.

Please let us know if you have a better solution.
 
Y

Yuri Vanzine

I have worked some time on a multilingual solution with ASP.NET. The best
approach to updatable language content is NOT to use satellite assemblies,
because you have to restart the server, every time you made a change to the
resx files.

Satellite assemblies do NOT allow for on-the-fly change of the string
resources.

Instead, use straight XML files with FileSystemWatcher objects for your
string resources and language-specific tables in the database for db data.
 
J

Jerry III

If you compile your resx files into resource only dlls (as you should) you
don't have to restart the server...

Jerry
 
H

Hannes Schmiderer

Yuri Vanzine said:
I have worked some time on a multilingual solution with ASP.NET. The best
approach to updatable language content is NOT to use satellite assemblies,
because you have to restart the server, every time you made a change to the
resx files.

Satellite assemblies do NOT allow for on-the-fly change of the string
resources.

Instead, use straight XML files with FileSystemWatcher objects for your
string resources and language-specific tables in the database for db data.

this is not true! Satellite assemblies only hold the resources. The
satellite assemblies are copied by the system to a temporary directory
and used from there. So they are not locked. You can replace them
whenever you want. You only have to change the .resx file, run resgen
and al and you have a new satellite assembly!

My solution will be, that we do not include a fallback/neutral
resource. We create the .resx files automatically (maybe from an
excel-file or another combined xml-file with xslt). So this can
replace the fallback of .NET. When a text is not defined in one
language, it is replaced by the same text of another language in the
..resx file automatically.

You should not use .resources files. They are locked if you do not
release them by ReleaseAllResources() from the ResourceManager. But
releasing them with every page is slowly. (as said in the microsoft
help).

By the way: I just tried to recompile a code-assembly which is used by
another one. I could use the new assembly without recompiling the
other - and of course without a restart of the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top