Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows 8 XAML Multilingual Translations
    primarykey
    data
    text
    <p>I've used the Multilingual Toolkit to translate my app and have been testing it using pseudo-language. It works fine for strings I have translated in code (C#) but I can't work out how to make it so that the tag in XAML is automatically translated.</p> <p>I've been using <a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965329.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965329.aspx</a> as a tutorial but I can't figure it out. I've also searched on Google but still no luck.</p> <p>For example, I created a "Watermark" text box (which inherits from <code>TextBox</code> which shows some text in by default it the user has not entered any text and the item does not have focus. The XAML looks like this (I replaced generic positioning stuff with '...'):</p> <pre><code>&lt;local:WatermarkTextbox x:Name="TitleTextBox" Watermark="MainPage_EnterATitle" ... Style="{StaticResource TextBoxStyle1}" /&gt; </code></pre> <p>As you can see it is setting a property called <code>Watermark</code> with a 'tag' of the resource name that is being translated using the Multilingual tool. I'm not sure how to get this to automatically translate.</p> <p>Another example is using the bottom app bar buttons:</p> <pre><code>&lt;Button x:Name="bottomAppBar_unpinFromStartButton" AutomationProperties.Name="MainPage_UnpinFromStart" Style="{StaticResource UnPinAppBarButtonStyle}" Click="bottomAppBar_unpinFromStartButton_Click"/&gt; </code></pre> <p>And I can see in the link above that it says:</p> <pre><code>MediumButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name </code></pre> <p>But I'm not really sure where this is meant to go.</p> <p>Even with a button, which seems like it would be the simplest to translate I can't get it to work. The XAML is:</p> <pre><code>&lt;Button x:Name="RemovePhotoButton" x:Uid="MainPage_RemovePhoto" Content="" HorizontalAlignment="Center" Margin="222,0,974,78" Grid.Row="1" VerticalAlignment="Bottom" Width="170" Height="45"/&gt; </code></pre> <p>But when ran in the app or viewed in the designed the button stays blank, with no text on it.</p> <p>The Resources are set up like this: </p> <p><img src="https://i.stack.imgur.com/cQInX.png" alt="enter image description here"></p> <p>And it is filling the translated documents fine:</p> <p><img src="https://i.stack.imgur.com/blGBM.png" alt="enter image description here"></p> <p>I am able to translate it in C# using the code from the link above, just not using XAML.</p> <p>Just wondering if anybody could help me out or point me in the right direction to solve this.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload