6

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?

Jonnus
  • 2,988
  • 2
  • 24
  • 33
J4N
  • 19,480
  • 39
  • 187
  • 340

1 Answers1

5

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
Chris U
  • 2,614
  • 4
  • 17
  • 16
  • doesn't this actually put the .resources file *into* the assembly? – yas4891 Nov 03 '11 at 10:24
  • Yes it does. But the Assembly does not have to be recompiled but has the new language strings integrated. – Chris U Nov 03 '11 at 11:04
  • Is there anyway to avoid this processing? by letting those resx file uncompiled? – J4N Nov 03 '11 at 12:06
  • I did not find any. This is the way we do it. We put the commands into a batch file and the customer executes if necessary. – Chris U Nov 03 '11 at 13:36
  • 1
    And with what those two tools(resgen and al) are provided? – J4N Nov 04 '11 at 15:04
  • 1
    They are provided with the .NET Framework SDK. http://msdn.microsoft.com/en-us/library/d9kh6s92%28v=vs.80%29.aspx – Chris U Nov 05 '11 at 10:53