|
Hey All, I have some questions regarding the best way to handle translations. In our app, we need a way to actually allow customers to define custom translations for the defaults based on the languages. Here is my thoughts: 1) The internal default translations can be done using .resx files built into the application. 2) The custom translations will be done by having customers specify <resourceName>.culture.txt, and then building satellite assemblies based on these text files.
So, in theory, if they define a .txt file, then I will convert it into a .resources, and build a satellite assembly as needed. Here is my challenge. What information do I need specified to me to create an instance of resource manager.
ie. If I have the name of the resource file, some of the resources are built in, while some are in the satellite, so I can't use ResourceManager's Create File Based Resource can I?
And If I get the "Type" of the resource file, how does this work with the satellite assemblies?
ie. Say I have a resources file: myapp.namespace.MyResources.resx Then I could go ResourceManager man = new ResourceManager(typeof(myapp.namespace.MyResources));
But...how can I get this to look at MyResources.en-US.resources first? I guess what I am unsure of is the namespacing. I don't think I can just make a MyResources.en-US.resources, and expect it to override the default correct? Do I have to put the MyReources in a folder structure to mimic the namespace or something?
Thanks for your help!
|