Windows Develop Bookmark and Share   
 index > Windows Forms General > ResourceManager and Translations
 

ResourceManager and Translations

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!
Nelson Brodyk  Thursday, April 17, 2008 5:45 PM

Hi Nelson Brodyk,

Here are some good articles about Localizing your .Net application by using Resource files, perhaps you will get some helpful information, please check the URLs below.

Resources and Localization

http://msdn2.microsoft.com/en-us/magazine/cc163609.aspx

.NET - Localization using Resource file

http://www.codeproject.com/KB/dotnet/Localization.aspx

Regards,

Xun

Xun Ye  Monday, April 21, 2008 9:42 AM

Hi Nelson Brodyk,

Here are some good articles about Localizing your .Net application by using Resource files, perhaps you will get some helpful information, please check the URLs below.

Resources and Localization

http://msdn2.microsoft.com/en-us/magazine/cc163609.aspx

.NET - Localization using Resource file

http://www.codeproject.com/KB/dotnet/Localization.aspx

Regards,

Xun

Xun Ye  Monday, April 21, 2008 9:42 AM

You can use google to search for other answers

Custom Search

More Threads

• combo box problem
• Reference to System.Data created for every new form
• showing different text in a pannel at runtime
• DataGridView.Copy()
• Creating icons and .ico files.
• language change
• OnCellPainting problem in DataGridView
• How to manage globalization of DataTime control?
• Crop Image Possible?
• problem with Object and SQLCommand