Custom Control with Localization Support in WP7

Posted by Ponmalar on Stack Overflow See other posts from Stack Overflow or by Ponmalar
Published on 2012-03-23T09:55:09Z Indexed on 2012/03/26 11:30 UTC
Read the original article Hit count: 187

Filed under:

I have created the DateTimePicker control. Now i want to add localization Support with this.

I have followed the below steps.

  1. Created CustomControls.de-DE.resx inside the ResourceFolder.
  2. added some commonly used strings in that resx file
  3. changed the access modifier to Public
  4. added <SupportedCulture>de-DE;</SupportedCulture> in the csproj file.
  5. set System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE"); in sample.cs file before IntializeComponent().
  6. my DateTimevalue was " 2 Day(s): 3 Hr (s): 5 Min(s) : 32 Sec (s)

Getting only default language that is english.

What i did wrong? Please help me anyone. Is anything i missed?

© Stack Overflow or respective owner

Related posts about windows-phone-7