Question How to make an "open" localizable application ?

Origami

Member
Joined
Jan 12, 2011
Messages
8
Programming Experience
5-10
Hello,

I'm currently designing an application that must be localizable. I looked over the Net and on this forum, and I know that I must use Resources files :
  • Default.resx
  • Default.fr-FR.resx
  • Default.en-US.resx
  • ...

This works if I creates those files and generate the Code.

But what I need is that a user, say from Italy, or Spain, can add his own Default.<his-language>.resx (or modify the Default.resx), and that the program must read the Resource file when opening the application.

Unfortunately, when I generate the EXE (and add that the resx file is copied to the bin directory), if I modify a value in the resx file, this value is not displayed on the program (the previous value is displayed).

So, is there a way to let the user modifies an resx file after the code has been compiled, and the program uses the value of the resx file ?

Thanks a lot for your help.


Note : One option for me is to create a TXT file and read the content of this file at the program startup, and put it in an Array. But I'd like to use the Resx files.
 
So, is there a way to let the user modifies an resx file after the code has been compiled, and the program uses the value of the resx file ?
To do that you have to replicate what VS does, which is convert the .resx to a .resources file and compile that to a satellite assembly using the .Net tool al.exe, then place the satellite dll in correct directory. Creating Satellite Assemblies
Converting to .resources file may be done using .Net tool resgen.exe or writing some code using System.Resources namespace.
 
Thanks for the reply. The problem is that from what I understand, this means that if someone from another country wants to translate the application in his language, he or I will have to recompile something, which I want to avoid.

So, I think the easiest solution will be to use a simple text file that will be loaded in an Array at startup. Like this, it will be very easy for the users to translate the application themselves.
 
It would also be easy for you to include a button in your to update translation for a given .resx file selected by user.
 
Back
Top