Getting Started with WPF | ComponentOne Studio Edition
Localization / Silverlight Localization
In This Topic
    Silverlight Localization
    In This Topic

    Localization for Silverlight applications is a bit different, as it has two extra steps.

    1. 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 at C:\Program Files\ComponentOne\Silverlight Edition\Help\LocalizationResources.zip.
    2. Second, you must unload your project and edit the < SupportedCultures> node in the project.csproj file.
      project.csproj
      Copy Code
      <SupportedCultures>es,en</SupportedCultures>
      

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

    Visual Basic
    Copy Code
    ' set culture to Spanish ("es")
    
    Thread.CurrentThread.CurrentUICulture = New CultureInfo("es")
    
    C#
    Copy Code
    // set culture to Spanish ("es")
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("es");
    

    This information just focuses on localizing C1 controls. You will likely have other UI strings that need to be localized too. For more information about Silverlight localization from Microsoft, see Localizing Silverlight-based Applications.

    See Also