This project is read-only.
For this tutorial you can download sample from Downloads page.
Hopefully with the same success you can practice on your own project. :)
Please make a backup of it - we are still in "alpha".

It is assumed that "Easy BAML" addin is downloaded and installed, following instructions in readme.txt.

1. Open TutorialSolution.sln and start "Easy BAML" using menu "Tools - EasyBamlAddin":

2. Since it is the first time we start "Easy BAML" for this solution, "Solution Settings" dialog will appear:
Field "Uid Generation Mode" has no effect in this version.
"Default language" defines language, in which you develop and which will be fallback language for your application.
Below list "Localization Language - Selected" contains languages, into which you want translate your application.
In "Localizable Projects" list please mark projects, that contain XAMLs (or will contain) which need to be localized.
Please note that Silverlight projects are not supported.
For this tutorial please select languages as on screenshot.

3. Click "Apply" button and after confirmation addin will configure solution for localization.
This may take several minutes, depending on number of projects and perhaps source control.
When message "Configuring solution projects complete" will appear, close it.
You will got on main "Easy BAML" window:
Can it be easier? :)
Button "Configure Solution..." will open "Solution settings" dialog, which we already saw.
About "Prepare Translation" button - little later...
And for now let's close "Easy BAML" window.

4. Let's press F5 to view our application running.
For now it is not localized:
Now close it.

5. Let's see what changes addin made in the project.
(Detailed description of changes please find on the page TODO.)
The most important for us now is folder Translation with files Translate.xx-YY.resx inside.
Thease files will contain our translated strings. Now they are empty.

6. We still have not set x:Uid attribute in our XAMLs.
Let's do it: start "Easy BAML" by menu item "Tools - EasyBamlAddin".
Now press button "Prepare Translation".
After some time we'll get message:
If you open MainWindow.xaml now, you'll see that x:Uid attributes were set at elements, which contain localizable content.

7. "Prepare Translation" also filled our translation files with string resources, which need to be localized.
Field name holds a key of localizable resource, Values are empty for now, and field Comment contains original text:

8. Please open file and enter translations in column Value.
I don't know German, so I just added "DE: " prefix to indicate language:
Of cource you can leave field Value blank, which will mean that value from fallback culture should be used.

9. Now we can start our application again.
And now it is translated!
You can explore file App.xaml.cs: there current culture is overriden to "de-DE", so you can experiment with other cultures or without overriding.

Last edited Jun 18, 2011 at 7:03 PM by skiba_k, version 6


taycleed Mar 2, 2012 at 1:06 AM 
I also tried using default locale "en" but saw no error.

arrow1800 Aug 10, 2011 at 11:28 AM 
and now please force this sample to the default locale "en"

it gives an error. why ?