Skip to content

Translating Paco

Bob Evans edited this page Apr 30, 2016 · 9 revisions

How to translate Paco to a new language

Introduction

We have recently added the necessary support to translate the Paco Android app into new languages. We are still working on translations for the iOS app and the web app.

We already have translations for the Android app in Hindi, Bengali, Tamil, Marathi, Kannada, Gujarati, and Greek. If you would like to add a new language for Android please follow these steps and send us your translated files as a Github Pull request. If you are not a developer, you can send us the translated file directly and we can submit it for you.

If you would like to add translation support for iOS or the web app please email us as we would be happy to help you make it happen.

Android Instructions for Translators

There are a couple of files that are involved in translation. The systems always fall back to English if there is no available translation.

Android Strings Files

strings.xml is the main file of strings to be translated. In Android, there is a different resource folder for each language translation that contains a strings.xml file.

To create a new translation, create a new folder under the Paco/res directory with the name, values-xx, where xx is the two-letter country code for the language you are translating. Inside create a copy of the strings.xml file with the translations to the new language according to the example below.

Android strings.xml example translation

Here is how to provide translations. From the default English strings.xml file in the values folder to the Hindi file, values-hi/strings.xml.

English

     <string name="go_to_network_settings" description="Button label">Network Settings</string>

Hindi

     <string name="go_to_network_settings">नेटवर्क सेटिंग</string>

(Note, the description can be omitted in the translated file)

The part between the tags <string name="key"> and </string> is the translated portion which is looked up by the key, "go_to_network_settings".

Note Be sure to set the encoding of the file to utf-8 to preserve multi-byte characters. If you are able to type characters in the new strings.xml file properly in the new language the encoding is probably set already.

Files that are out of date and should not be translated right now

We need to completely update the help guide.

Web app (Server) Strings Files

iOS strings

TBD


I hope this introduction to translation helps. We are happy to work with you on this.


Third Party Framework Localization References

For more information about how to translate strings for Android and for AngularJs (our web app framework), please see the following resources. They describe more complex topics like strings with embedded variable values that are produced programmatically and other formatting concerns.

*Android Localization *AngularJS Localization

Clone this wiki locally