johnvisiomvp

Life with Visio and other Microsoft Toys!

WP7 Can you translate that for me? VS Multilingual Toolkit

with one comment

I have done a few apps that support several languages and the basic process was not bad but juggling the translations was far from easy. It required exporting to Excel, merging the English language with the new language. The hint column in the resource file was not bad, but it was easier just merging the two files. Once I got the files back from the translator, there was still the issue of implementing the strings, one at a time.

With the Multilingual Toolkit, it was just a matter of specifying the new language. Once the app was built, it loaded the XLF file with the contents of AppResources.resx and AppResources.xx.resx. At that point you can select a line and use the Microsoft Translator on it. You can even do a Translate All to handle all the strings. I have yet to try Translate All on a partially translated file, but my suspicions are that one of the State switch prevents retranslation. (I still have more playing testing to do.)

One issue I did run across was that the documentation only talked about existing strings. There was no instructions for what to do when you want to add strings. The xlf files did not have an add string button or menu item. To add strings requires adding them to AppResources.resx, ignore the warning and do a build. The strings will now appear in the xlf files for the other languages. It does appear that AppResources.resx is the key and the toolkit keeps the other resource files in sync.

Starting from scratch works fine, but you need to take care when adding the toolkit to an app that has existing translations. I had to delete the existing language specific resx files (after I saved the content to Excel) and let the Toolkit create new ones. It was then just a matter of adding the translations back in.

The documentation also needs to be improved for translators. The email to the translator includes the file, but the link provided takes them to a page that instructs them to make sure they have the latest service packs for Visual Studio. I know it sounds strange, but there are people in the world who do not care about Visual Studio. They just want to be taken to a page that allows them to download a standalone app that will help them use the xlf file. The FAQ does indicate that you do not need Windows 8 and Visual Studio, but I have yet to test it (too many Win 8 machines with Visual Studio).

Actually, there is a problem with creating the email. The email opens behind Visual Studio. The only clue that this was going on was the flashing Outlook icon on the taskbar.

I was originally reluctant to use the tool, but after the first app, I can not see why. It was far easier than the old way. Of course, it is not all smooth sailing, I tried to retro fit the Toolkit on one app, but ended up with three cryptic errors. Your basic, “We do not like what you did error, but we are not going to give you a hint as to what we do not like” error. They contain no hints that BinGgle can use to find a solution.

proj1.csproj(265,5): error : Generation of satellite resource failed calling resgen.exe
proj1.csproj(265,5): error : Build of multilingual resource files failed.
proj1.csproj(265,5): error : Multilingual App Toolkit build completed with errors.

I was not able to find the problem, but I did find the solution. The original app used resource files at the main level. The error disappeared when I created a Resources folder in the main level and added the resource files to it. The resource files were not recognized, so I backed up the information to Excel, deleted the language specific resource files (other than AppResources.resx) and used the Add Language command from the menu. I did try to replace the resource files with the originals, but no success, so I resorted to cut and paste from Excel to the new xlf files. Everything worked fine.

Though a bit scary, you can install the toolkit on a Windows 7 machine that does not have Visual Studio. You just have to make sure you have the Dot Net Framework 4.0 or higher.

So how do you get started?

http://msdn.microsoft.com/en-us/windows/apps/hh848309.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/jj569303.aspx

So how can it be improved?

  • Improve the webpage for translators
  • Stop hiding the email when sending to translator
  • In addition to TranslateAll, allow the user to select several strings to be translated
  • Allow several xlf files to be combined so that a translator only needs to deal with one file.

John Marshall… Visio MVP       Visio.MVPs.org

Advertisements

Written by johnvisiomvp

May 26, 2013 at 2:05 pm

One Response

Subscribe to comments with RSS.

  1. You actually make it appear really easy together with your presentation however I inn finding this matter to be really one thing which I
    think I might by no means understand. It kind of feels too complicated and very extensive for
    me. I amm taking a look forward for your subsequent submit, I will attempt
    to get the clking of it!

    professionelle eismaschine

    August 12, 2014 at 6:32 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: