views:

118

answers:

1

I woulld like to localize my WPF application with resource files. It good technics. But I have requirement to give ability to end user to change some localization information (for example some word traslation). It means change information in the resourse files on the fly (in run time). Is it possible ?

A: 

This would involve recompiling the resources on the fly; and reloading them will be quite difficult (as DLLs cannot be unloaded without unloading an AppDomain).

In such a configuration, you're better off using the database to store your translations.

Timores
I want to store traslation information in local machine of user. I think for translation I can use XML File. But in this case I have to bind every lable to the specific node value in XML file. Is it good?
Polaris
Yes, you can define a convention for the structure of this XML file (a simple idea is to have the 2nd-level element being the language) based on your forms structure and then with an XmlDataProvider that is rooted to the form itself, bind the label to a simple path within the file.
Timores