Localizing your app name and tile on Windows Phone 8

By | July 14, 2014

This past week we’ve been presented with quite a few reasons to make sure that when we develop, we’re thinking globally, not just locally in terms of who’s going to be using and downloading our app:

US, India and Brazil are top Windows Phone Markets- Report
Karbonn Mobiles to launch three Windows Phones in India
India Ranks as the Second Largest Market for Windows Phone

Certainly the analytics for my latest up – Upload to YouTube – also reflect this fact, which is especially surprising for an ignorant American:

image

I like to think if my app wasn’t translated for (most) of these languages, it probably wouldn’t get nearly the usage that it’s getting in these markets. Portuguese getting nearly the same usage as English? Pretty crazy.

That being said, I’m sure there are a lot of developers that know how to localize our applications using resx files for the strings. However there’s one part that a lot of us forget about in mobile land – our app in the app list.

There’s some argument for not translating the name, I suppose, things like “BizSaver” don’t exactly translate, but something like “Upload to YouTube” certainly would. As well as “Who Called Me?” and “Social Camera.” So how do we do this? Turns out it’s definitely not straightforward (and the MSDN doco could stand for some revision) – hence the reason I thought a blog post would benefit.

There’s an MSDN article that outlines how to do this quite well, but I thought I’d add in a couple of #protip-esque stuff on to the content there.

Firstly, disregard all the file name copying and all that jazz. Instead, do a little something like this when you configure the C++ projects:

image

image

Where my project’s directory structure looks like:

image

And my app solution looks like this:

image

So you can see that what this ends up doing w/ the C++ project, is drops the output right in to the WP App’s location so then you can just:

image

(I’m using a cool extension call File Nesting so I can nest the specific ones under neutral to clean up my Solution Explorer. Not required)

This makes managing the files a LOT easier, instead of doing all the copy-move-renaming alluded to in that MSDN article.

The other thing to note is that the files are NOT placed in the \Resources subdirectory as instructed in the MSDN article. I have commented on the doco in hopes they’ll fix this, but to date I don’t believe they have. If you DO place them in \Resources, it won’t work.

You can follow the instructions on testing your app in the new languages from that MSDN page to watch it in action. But here’s another added gem you get during development when you do this:

image

To make the above code work you have to add the special preprocessor directives to your C++ project’s configuration since they’re not automatic like they are w/ C# projects. We do this like so:

image

Yeah that’s right. How often have you deployed a debug version to your phone, had the version from the store installed, and gotten confused as to which was which? No more. Now when you build DEBUG, you can make it show up with “DEBUG” appended to the app name!

image

So hopefully you can see some usefulness in this. Obviously it doesn’t make sense for all apps, but certainly does if your app is effectively a “command” like my new one.

image

Enjoy! I’m also going to be doing a post on the Multilingual App Toolkit in the near future and how I’m using that to make Upload to YouTube more globally accessible so stay tuned!