Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#: Change the resource file without re-building?

For an Asp.Net MVC 3 application, I will a use resources files to store my I18N( How-to ).

It's not me which will translate all fields in all languages, I just have to create in one language and create empty language files for the two other languages. And in the implementation I will use those three files.

So for the development I've not any problem, but after I've created the website, it's the customer which will translate all those fields. I found a great app which allows to translate from one resx to one other ( SimpleResxEditor ). But now, how can the customer change this resx file in the asp.net website without visual studio? Is there a way to specify in visual studio that we use a "not-embedded" resource file, and changing this file will takes an immediate effect?

like image 834
J4N Avatar asked Nov 03 '11 06:11

J4N


1 Answers

You have to create the ressource file via resgen first:

resgen InternationalResources.resx

Output is a .resources file.

After the you have to link the ressource to the assembly via al.exe:

al.exe 
/t:lib 
/culture:de-AT 
/out:"\LocalizeableConsole.resources.dll" 
/embed:InternationalResources.resources,LocalizeableConsole.InternationalResources.de-AT.resources 
/template:"LocalizeableConsole.exe"
/keyf:KeyFile.snk
like image 183
Chris U Avatar answered Sep 24 '22 07:09

Chris U