WPF Localization in XAML, what is the simple, easy and elegant way of doing it?

Viewed 14326

I have a very common question. What is the best way to do localization in a WPF app. Well, I searched in SO and Binged a lot too. But I could not find any pointers which is really simple and elegant.

Assume that I have to display in UI something like:

In English: Orgnanization - Beoing

In French: Organizzazione - Beoing

    <StackPanel Orientation="Horizontal">
        <TextBlock Text="Organization -"></TextBlock>
        <TextBlock Text="{Binding Path=OrganizationName}">
        </TextBlock>
    </StackPanel>

Basically, I need to assign the localized text to Organization Label TextBlock. Should I separate the hyphen from "Organization -" and put it in a separate label?

How do I do that?

5 Answers
Related