Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Talk:Adding multilingual support to your Windows Phone application using the Multilingual App Toolkit

From Wiki
Jump to: navigation, search

Contents

Croozeus - Pretty good article!

Hi PedroQ,

Thanks for the article... It is indeed a good topic to write about and well written article.

Good work adding the screenshots too, I see you added GIF images. They do help understand the tutorial better, much better than the plain tutorial on msdn.

Do add references if any :-)

Regards

Pankaj.

croozeus (talk) 18:20, 21 July 2013 (EEST)

PedroQ -

Hello Pankaj!

Thank you very much!

I believe having an animated picture will help people understand better what is going on. Apparently it was a good idea :)

As for the references, they're in the See Also section. Should I move them to another place?

Regards,

Pedro

PedroQ (talk) 18:45, 21 July 2013 (EEST)

Croozeus - Featured on Wiki Home page

Ah right, I see them now. They are in the right place.. Thanks Pedro.

Btw, I just featured this article on the Wiki home page: http://developer.nokia.com/Community/Wiki/Wiki_Home and the community blog: http://developer.nokia.com/Blogs/Community/2013/07/21/adding-multilingual-support-to-your-windows-phone-application-using-the-multilingual-app-toolkit-featured-article-windows-phone/

Looking forward to see more articles from you!

Regards

Pankaj

croozeus (talk) 19:10, 21 July 2013 (EEST)

PedroQ -

Awesome! I'm glad that you find it useful :)

Regards,

Pedro

PedroQ (talk) 19:16, 21 July 2013 (EEST)

Hamishwillee - Agree, very nicely done article!

Hi Pedro

Well written an structured, with excellent coverage of the functionality provided. Not recommending you change anything here but one thing to consider for next time is using image style with a frame and captions: Help:Files & Images#Images

What devices did you test on? Would this code work for Windows Phone 7.5?

A couple of what are probably silly questions.

  1. You wrote in XAML ""{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" - do you need to do anything to tell the system what and where "LocalizedResources" and "LocalizedStrings" are? To put it another way, bindings often look like magic to me, so I'm asking if this is a standard naming from using the toolkit that you don't need to worry about, or is there something else you need to do?
  2. I see AppResources.resx is where the localisations go, presumably one per language. Do all translations go in this one file or are their multiple files for multiple languages identified by a language code or by location of the tile in the project? This might be transparent to users, but could be worth adding a Template:Note, because its the sort of thing that interests people.

Thank you for this article - really excellent job.

Regards

H

hamishwillee (talk) 03:11, 22 July 2013 (EEST)

PedroQ -

Hello Hamish,

Thank you for the suggestion! I will sure use it on my next article.

I only tested this on the Windows Phone 8 Emulator, as I do have a Windows Phone 8 device. But there should be no differences.

This should work on a Windows Phone 7 project. As long as you have a Resources folder with the AppResources.resx file inside, you should be able to enable MAT and use it. This tool only makes it easier to create .resx files for each language. The only difference in Windows Phone 8 is that when you create a new project, all this wiring is done for you. I guess this was as incentive from Microsoft for developers to localize their apps.

Regarding your other questions (not silly at all!)

1. The Windows Phone 8 template has done this work for you. When you create a new Windows Phone App project, you'll notice that LocalizedStrings.cs is already there. But to answer your question, if you open App.xaml, you'll see this line:
<local:LocalizedStrings xmlns:local="clr-namespace:Multilingual_App_Example" x:Key="LocalizedStrings"/>
LocalizedResources is just a property inside the LocalStrings.cs class that is populated with the resources matching the phone's language (or the default ones). Think of LocalStrings class as a model for localized resources.

2. AppResources.resx is the file where the default resources are. When you add a new language, a new file AppResources.<language-code>.xlf is added. Each language goes into its own file. Later, when you build your app, these files are compiled into .resx. I tried to explain this in the Add new languages section, but maybe I should make it clearer.

Not sure if I was able to answer your questions in a clear way, but if not, I'll be glad to try and explain it better :)

Thank you very much for the feedback!

-Pedro

PedroQ (talk) 04:01, 22 July 2013 (EEST)

Hamishwillee - Answered perfectly

Hi Pedro

That makes perfect sense thank you.

I've added a few short notes to capture the key points. Can you please sanity check these. Note that I haven't added the category for Windows Phone 7.5 though - for that we'd have to verify steps that show how to integrate needed wiring into WP7.

Regards

Hamish

hamishwillee (talk) 05:51, 22 July 2013 (EEST)

PedroQ - confirmed: Works on WP7

Hey Hamish,

I tested this on a Windows Phone 7 projects and it works. I had to make a few changes (add LocalizedStrings.cs and AppResources.resx), but nothing too complicated. The only issue I found is that when you double click a .xlf file, it doesn't open the Multilingual Editor. You have to right click and select Open With. You can set it as default and it fixes the issue.

PedroQ (talk) 17:24, 22 July 2013 (EEST)

Hamishwillee - Good news

Hi Pedro

That's good! Do you think you could add a section near the end "Working with Windows Phone 7" (or whatever) to capture the changes you had to make?

regards

H

hamishwillee (talk) 08:25, 23 July 2013 (EEST)

PedroQ - WP7 section added

Hello Hamish,

Added the section about Windows Phone 7 and edited your note. What do you think?

Regards

-Pedro

PedroQ (talk) 14:07, 23 July 2013 (EEST)

Hamishwillee - I think it is truly excellent.

Thank you!

hamishwillee (talk) 05:00, 24 July 2013 (EEST)

Chintandave er - Nice article - Thanks

Hi Pedro, Have to say, nice article. and also with nicely written. Those GIF looks good.

Thanks and keep it up.

Chintan.

Chintandave er 14:29, 30 July 2013 (EEST)

Atkulp - Helpful tool

While you are working on your translations, you might need to send around the XLF files for help. I just wrote a Windows Phone 8 app to view the XLF files. I'll be adding modification in the near future. For now, it's a good review tool. Check it out!

http://blog.ariankulp.com/2013/08/new-app-xliff-localization-helper.html

-Arian

atkulp (talk) 02:38, 2 September 2013 (EEST)

S3lena - solution to localize resources

Hi! Note that if you want to localize resources to make your app multilingual, you can use a online tool like https://poeditor.com/

This one is especially easy to use and good for collaborative localization projects.

s3lena (talk) 17:14, 21 January 2014 (EET)

Hamishwillee - S3lena - true, but that is only part of the story

Hi S3lena

Great, but this is worth another article - specifically how to export/import the files needed to the service and to the project - then linking here. Can you write that?

Regards

H

hamishwillee (talk) 05:44, 22 January 2014 (EET)

VasWork - Enum.Parse(

Hi!

First of all, thanks for the tips. I need it for my Windows phone 7.8 (HTC Mozart).

In my case two modifications I had to change: 1) App.xaml

<Application ... xmlns:local="clr-namespace:<my_app_namespace>"

<Application.Resources> ... <local:LocalizedStrings x:Key="LocalizedStrings"/>

2) App.xaml.cs

FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection, true); // true -ignore case.

Last boolean required.

Thanks again!

Slava V.

VasWork (talk) 18:51, 5 May 2014 (EEST)

 

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×