Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

How to: Make Non-String Values Localizable

Silverlight

In some cases, your XAML code may contain a non-string value. When you localize your Silverlight-based application, you can make the non-string value localizable by performing the following steps. This procedure assumes that you have already created the necessary resource files and created the class that returns the resources. (For more information, see Localizing Silverlight-based Applications.)

To make a non-string value localizable

  1. Store a string representation of the non-string value that you want to make localizable in the resource file.

  2. Use a value converter (an System.Windows.Data.IValueConverter implementation) to convert the string to the appropriate type. (See How to: Combine Localizable Strings at Run Time and How to: Make Rich Text Strings Localizable for examples that provide IValueConverter implementations.)

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.