Wednesday, 3 September 2014

Translating Weight Tracker

If you are interested in translating Weight Tracker, read on!


You will need a decent text editor before starting. On Windows I recommend Notepad++

On Linux, Gedit is more than fine. I'd be grateful for anyone to recommend a Mac text editor.

Web hosted email tends to play funny tricks with xml files, so may need a zip utility to zip up your text file to prevent any malarky by Yahoo! etc. Linux comes with zip/unzip, on Windows I recommend 7-zip

You need to be able to download files, attach files via email, how to use text editors and how to use zip/unzip utility programs.


All the strings in the app are stored in a file called Strings.xml:

Download Strings.xml

The file contains many string elements, like:

    <string name="quickhelp_description_chart">Chart showing your weight changes over time</string>

The name, highlighted in red, is a descriptive name of where you will see the string, so here you can guess that this string is on the quick help screen and provides a description of the chart:

To translate this into Spanish, you would do
<string name="quickhelp_description_chart">Gráfico que muestra los cambios de peso en el tiempo</string>

Note the name is not translated, its still the same, only the green part is translated.

When all strings have been translated, save the file as Strings.xml, zip it up and send it to my pigdogbay email address (see the about screen in the app).

Technical Quirks

I use Eclipse to develop Android Apps and it can be a real pain in the ***! Here are some of the common problems that I run into and where you can help me out before providing your translations:

  • Apostrophes, ' , these need to be preceded with a backslash, for example \'
  • File encodings, Eclipse uses UTF-8, please ensure that you save strings.xml as UTF-8. You can check this in your editor's save-as dialog or file preferences.


The problem is that you can not check your translations to see how they will appear in the app. I will have to take your Strings.xml, compile a new version of the app and send you a link to the APK file for you to side load.

Once you have the updated app, you need to check that the strings fit the screen and don't mess up the user interface. One tip to avoid problems is to try and keep strings about the same length as the English version. Maybe use abbreviations such as the French 'SVP' for 'Please'.

Once we are both happy with the translations, I'll put them into the next release that will appear on Google Play. I will credit you on Google Play with providing the translation.


If I make future releases of the App I may notify you to ask you with help in providing new translations for any changes. Since the app is quite mature now, this hopefully will be quite rare.

Many thanks to the people who have sent me emails with offers of help, much appreciated and I hope this post will now help.

Kind Regards
Pig Dog Bay

No comments:

Post a Comment