#1,119 – Localization I – Set UICulture Tag

The first step in localizing an application is to add a UICulture tag to your project file, as shown below.  This tells the compiler that you’ll be localizing your application and specifies a default culture to use.

To make this change:

  • Open your project file (e.g. .csproj) in a text editor
  • Add the following tag within the first PropertyGroup:
    • <UICulture>en-US</UICulture>
  • Save your change
  • Open the project in Visual Studio
  • Rebuild the project

1119-002

The application will run as it did before, but the compiled versions of your XAML files (BAML) are now located in a separate DLL–a satellite assembly.  We can see this by comparing the contents of the \bin directory before and after the change.

Before making the change, we just had an .exe file.

1119-001

After the change, the main directory contains the .exe file and a new en-US sub-directory.

1119-003

In the en-US folder is a DLL containing the BAML.

1119-004

 


Note: You’ll also need to set the NeutralResourcesLanguage attribute in AssemblyInfo.cs.

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: