0

I am attempting to write a small program that uses localized resources that depend on the language and culture. You can view a video explanation here.

My two questions are

  1. How can I (from the IDE/Visual Studio) access resources from a satellite DLL
  2. Specifically, how can I access an image for a pictureBox control.

Here are the two Projects:

enter image description here

One is a library and one is a windows form project. I want to reference the resx files from Form1. If this is not the correct way to use this, please explain how I should be creating my satellite DLL.

Here is how I want the Form to look in American Culture:

enter image description here

and here is how I want it to look in Australian Culture:

enter image description here

jth41
  • 3,808
  • 9
  • 59
  • 109

1 Answers1

0
  1. Please check this page: http://msdn.microsoft.com/en-us/library/y99d1cd3(v=vs.80).aspx It is about how to localize a string and from which you will know we use different resource file for different language version. Here is the description of it from that page: "In general, you should use forms-based resources for all resources specific to a form in your Windows Forms application. You should use project resources for all non-forms-based user interface strings and images, such as error messages."
  2. Here is way and code about image: Localization of image resources in Windows Forms and a step by step solution here: Proper localization of a WinForms application

I've just completed a C# .Net 3.5 project with a similar problem. We were writing WinForms plugin for an existing multi-lingual application with 8 languages (including English). This is how we did it: Create all our forms and UI in the default language, English. Put all our internal strings in a resource file (stuff not tied directly to a form like custom error messages and dialog box titles etc) Once we had completed most of the work and testing we localised it. Each form already had a .resx file but this was empty. We set the property 'Localizable' to true, the .resx file was filled with things like button sizes & strings. For each of the other languages, we changed the 'Language' property on the form. We chose the basic version of each language eg: 'Spanish' instead of 'Spanish (Chile)' etc. so that it would work for every 'Spanish' dialect, I think. Then we went through each control, translated its text and resized, if needed. This created a .resx per language and form combination. We were then left with, for 8 languages, 8 .resx for each form and 8 .resx for the general strings. When compiled the output folder had the .dll we were creating and then a sub folder for each language with a .resources.dll in it.

Community
  • 1
  • 1