Localization, Localización, Lokalisering

With Studio for WPF and Silverlight 2011 v2, you can now broaden your global audience with built-in localization support for 20+ international languages. This means that all UI strings baked into ComponentOne WPF and Silverlight controls can be automatically translated into these languages (aside from English):

  1. Arabic (ar)
  2. Danish (da)
  3. Dutch (nl)
  4. Finnish (fi)
  5. French (fr)
  6. German (de)
  7. Hebrew (he)
  8. Italian (it)
  9. Japanese (ja)
  10. Norwegian (no)
  11. Portuguese (pt)
  12. Russian (ru)
  13. Spanish (es)
  14. Swedish (sv)
  15. Czech (cs) - added 2012 v1
  16. Greek (el) - added 2012 v1
  17. Polish (pl) - added 2012 v1
  18. Slovak (sk) - added 2012 v1
  19. General Chinese (zh) - added 2012 v2
  20. Traditional Chinese (zh-Hant) - added 2012 v2
  21. Simplified Chinese (zh-Hans) - added 2012 v2
  22. Turkish (tr) - added 2013 v1
  23. Romanian (ro) - added 2014 v2

WPF Localization

When you localize a WPF application you have several options. See here for best practices from Microsoft. When you use ComponentOne controls in your application the localized resources are automatically included in your output based upon the published language you specify in your project's settings. They will come from their installed location under C:\Program Files\ComponentOne\Studio for WPF\bin, and do not need to be added manually to the project. Change the UI Culture of your application to the desired culture. One way of doing this is on the application's current thread:

// set culture to Spanish ("es")  
Thread.CurrentThread.CurrentUICulture = new CultureInfo("es");

Some controls have many baked in UI strings that can benefit from quick localization including C1Scheduler, C1DataGrid, C1DockControl, C1PdfViewer and C1RichTextBoxToolbar.

Silverlight Localization

Localization for Silverlight applications is a bit different, as it has two extra steps. First, you should add the desired localized resource files (.resx) to your project's Resources directory (Build Action: Embedded Resource). We provide the localized resource files for each ComponentOne assembly located at C:\Program Files\ComponentOne\Studio for Silverlight 4.0\Help\LocalizationResources.zip. Second, you must unload your project and edit the node in the project .csproj file. See here for more information.


The final step is the same in WPF; change the application thread's culture.

// set culture to Spanish ("es")  
Thread.CurrentThread.CurrentUICulture = new CultureInfo("es");

Check out a live demo showing every provided language in Studio for Silverlight. This post just focused on localizing C1 controls. You will likely have other UI strings that need localized too, so see here for more information about Silverlight localization from Microsoft.

ComponentOne Product Manager Greg Lutz

Greg Lutz

comments powered by Disqus