#1,127 – Localization VIII – Passing Comments On to the Translator

When you have an application that will be localizable, you use localization attributes to explicitly mark which elements need to be localized.  You may want to also add a comment for a particular element, to help the translator in localizing the content.

You can add a comment for the translator in a XAML file using the Localization.Comments attribute.  The property can contain comments for multiple attributes and the comments will be written to the .csv file with the corresponding attribute.

Below, we specify a comment to be associated with the Content property.

        <Button x:Uid="Button_1" Content="Learn More" Margin="5"
                Localization.Attributes="$Content(Unmodifiable) Margin(Unmodifiable)"
                Localization.Comments="Content(Should be an imperative--a command)"/>

Now, after generating the .csv file with LocBaml, we see that the comment shows up.