locked
How to display English and Non-English together in TextBlock

    Question

  • Say, I need to display English and Non-English in textBlock as below, What I need to do?

    <TextBlock HorizontalAlignment="Left" Margin="35,82,0,0" TextWrapping="Wrap" FontSize="46" Foreground="LightGreen"  Text="" VerticalAlignment="Top" Height="64" Width="1031">
              
     Credential SetUp (-凭据设置)

     </TextBlock>

    Thanks

    Tuesday, March 4, 2014 6:13 AM

All replies

  • You need to use multiple textblocks together in a horizontal stackpanel:

    <StackPanel Orientation="Horizontal">
    <TextBlock Font="EnglishFont">English Text</Textblock>
    <TextBlock Font="NonEnglishFont">Non-English Text</Textblock>
    </StackPanel


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, March 4, 2014 1:30 PM
    Moderator
  • I see some differences and not sure will it cause concern:

    1) outside text=""
    <TextBlock HorizontalAlignment="Left" Margin="35,82,0,0" TextWrapping="Wrap" FontSize="46" Foreground="LightGreen"  Text="" VerticalAlignment="Top" Height="64" Width="1031">
               
      Credential SetUp (-凭据设置)

     </TextBlock>

    2) inside text=""
    <TextBlock HorizontalAlignment="Left" Margin="35,82,0,0" TextWrapping="Wrap" FontSize="46" Foreground="LightGreen"  Text="Credential SetUp (-凭据设置)" VerticalAlignment="Top" Height="64" Width="1031">
     </TextBlock>

    for(method 1) : The words will not be visible in VS

    for(Method 2) : The words are visible  in VS.

    for (1 and 2), I did not add any font. Do I need to add ?

    <TextBlock Font="NonEnglishFont">Non-English Text</Textblock>

    for certification or upload to App store:

    1) Some parts of the world, the businesses or enterprises may need dual languages. If I do as the above, will it fail the certification?

    2) Using Localization, I need to keep 2 copies of value for both languages. Since the Emulator can correctly display the English and non-English words, I assume it will work in actual device.

    Thanks

    Wednesday, March 5, 2014 7:42 AM
  • I really don't understand what the problem is or the question. Can you show me in images?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, March 6, 2014 2:28 PM
    Moderator