Specific information related to localizing the Simple Android app
- Define a source locale (default:
en) which Transifex will automatically read whenever changes are pushed to a specific branch on the project (currently
The Transifex GitHub integration settings can be found on the project settings page under the Integrations section.
In the GitHub integration settings, there is a language mapping section that tells Transifex how to convert from the locale conventions that it uses to the locale conventions that the Android app uses. This will be used by Transifex when raising pull requests to merge new translations into the app.
The current mapping (at the time this article was written) looks something like this:
On the left are locale codes in the Transifex convention, while on the right are the locales in the convention that the Android app expects. Whenever a new language is added to the app, this mapping table also needs to be updated.
The Transifex integration has currently been setup to automatically raise pull requests whenever a language is 100% translated. Sometimes, however, we might need to pull partially translated languages manually and put them in the app. Transifex supports this use case as well.
- Once logged in, on the Dashboard tab, with All projects selected on the left navigation bar.
- Click on the simple-android project, and then click on Languages in the sidebar.
- The list of languages appears. Click on the language you manually want to download translations for.
- The list of source files in that language appears. Currently, the Android app has only one source file,
strings.xml. Click on it, and the following view opens. Click on Download for use to download an Android string resource file that can be dropped into the project.
- The name of the file does not match the Android conventions when downloaded manually. You should rename the file to
strings.xmlto match the conventions.
- Place the strings into the appropriate resource directly and raise a pull request with the new strings.
Regardless of whether the string resources are raised automatically via Transifex, or manually added, a new language does not automatically show up in the list of languages the user can select via the Settings screen. In order to add a new language to the screen, add an entry to the