问题
For an Asp.Net MVC 3 application, I will use resources files to store my I18N( How-to ).
It's not me which will translate all fields in all language, I juste have to create in one language and create empty language files for the two other language. 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?
回答1:
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
来源:https://stackoverflow.com/questions/7991178/c-change-the-resource-file-without-re-building