German Localized Strings Now Available in NetAdvantage 10.2

Craig Shoemaker / Wednesday, June 23, 2010

In the 10.2 release NetAdvantage now support localized strings in German. This post explains how to setup Silverlight and WPF applications to render German control strings.

    Note: If you are developing with the German release of Visual Studio 2010 running on a German OS, then these changes are unnecessary and the German resource strings will appear automatically.

Silverlight

The below image represents how the xamGrid looks in German:

To localize a Silverlight application, you must make changes in two places: in the project file and in the HTML markup. To edit the project file, begin by unloading the Silverlight project from the solution:

Then right-click on the project name and select Edit:

Look for the SupportedCultures node under PropertyGroup. Add “de” as content to the element:

Next, reload the Silverlight project:

Finally, locate the ASPX or HTML file that is hosting the Silverlight content. Add a parameter to the object tag that instantiates the Silverlight plug-in with a name of uiculture with the value of de:

Now when you launch your Silverlight application the German resources are used for any strings returned from Infragistics controls.

WPF

The steps to localize a WPF application are decidedly shorter. Below is an image of how the xamDataGrid looks with resource strings localized in German:

To achieve this effect add the following code to the OnStartUp method in the App.xaml.cs file:

using System.Globalization;
using System.Threading;
using System.Windows;

public partial class App : Application
{
    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

        Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE", false);
    }
}