locked
LocalizedStrings in Universal app!

    Question

  • I'm windows phone developer, trying to port windows phone app to universal app.

    Is there any default LocalizedStrings kind of thing in universal app? So that the app automatically localizes the strings based upon the region

    What all I can see is Resources.resw item, I guess I have to add all different language strings separately. 



    Clipr : Best ever clipping tool in Windows Phone!
    Download here

    Monday, April 7, 2014 8:58 PM

Answers

  • yes! that works versy easy.

    imagine a textblock, there you set a x:Uid attribute.

    <TextBlock x:Uid="mytextblock" />

    then create a resw file and as key you add:

    mytextblock.Text then as value the value for the text

    see http://msdn.microsoft.com/en-US/library/windows/apps/xaml/hh710212.aspx for more information


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    • Edited by Dave SmitsMVP Monday, April 7, 2014 10:34 PM
    • Proposed as answer by Ed Alexander Tuesday, April 8, 2014 1:07 PM
    • Marked as answer by venu238 Tuesday, April 8, 2014 1:18 PM
    Monday, April 7, 2014 10:27 PM

All replies

  • yes! that works versy easy.

    imagine a textblock, there you set a x:Uid attribute.

    <TextBlock x:Uid="mytextblock" />

    then create a resw file and as key you add:

    mytextblock.Text then as value the value for the text

    see http://msdn.microsoft.com/en-US/library/windows/apps/xaml/hh710212.aspx for more information


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    • Edited by Dave SmitsMVP Monday, April 7, 2014 10:34 PM
    • Proposed as answer by Ed Alexander Tuesday, April 8, 2014 1:07 PM
    • Marked as answer by venu238 Tuesday, April 8, 2014 1:18 PM
    Monday, April 7, 2014 10:27 PM
  • Thanks for the reply,

    What I understood from your post is, if I set x:Uid attribute for my element then it automatically localizes the text present in the resources file. Just confirm me.


    Clipr : Best ever clipping tool in Windows Phone!
    Download here





    • Edited by venu238 Tuesday, April 8, 2014 8:40 AM
    Tuesday, April 8, 2014 7:30 AM
  • yep true...

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Tuesday, April 8, 2014 11:05 AM
  • You might also try the Multilingual App Toolkit from Microsoft to aid in building the translation files.  Allows for auto-translation of your default language resw file for a first pass.  Also provides a machine translation capability to help you review the UX for strings you missed (not localized).

     
    Tuesday, April 8, 2014 1:07 PM
  • Thank you :)

    I'll also try the Multilingual App Toolkit from Microsoft.


    Clipr : Best ever clipping tool in Windows Phone!
    Download here

    Tuesday, April 8, 2014 1:20 PM