All Toolkit content including instruction sets for different RDT types can be found on GitHub. Both the App text AND the RDT instructions can be translated.
Currently the Rapid Diagnostics Toolkit is available in:
- French (not fully translated for all RDTs)
- English
- Portuguese
- Malagasy (not fully translated for all RDTs)
![](https://dimagi.atlassian.net/wiki/download/thumbnails/2145557400/Languages%20Rapid%20Diagnostic%20Toolkit.jpg?version=1&modificationDate=1633017404678&cacheVersion=1&api=v2&width=140&height=250)
The Settings menu in the Android App can be used to select one of these languages
The application translations are managed through standard Android SDK translation assets. Software developers can use the Android Studio built-in translation tools to add new languages or easily update translations.
For non-technical teams who want to add a new language for translation, the main translation file can be found online here. This file can be edited with any text editor, changing the inside of the XML <string> tags.
Note:
XML escaping will need to be used: primarily, apostrophe characters will need to be escaped with backslashes, so “it's” -> “it\'s”
Placeholders (%s, %d) will need to be retained.
New languages need to be added by creating a new strings-LANGCODE folder in the resources directory with the appropriate android ISO langcode for the new locale, and placing the translate strings.xml file inside that folder
“Dynamic” content about tests or classifiers, like Job Aids or test instructions, are translated in a different format. This content is maintained inside of a “Folio” file which may or may not be part of the hard coded application.
Currently, the folio files are maintained as Android App Assets, and the folios for each test and job aid are maintained independently (along with their multimedia files). To update translations for these, the appropriate folio.json file needs to be changed directly.
An example app folio file can be found in the code for a Job Aid interpreting the Care Start Pf/Pv test results.
To add a new language for translation, one of the existing blocks should be copied and pasted to the end of the list, changing the ‘lang’ key to the same ISO langcode mentioned above for the APK translations, and then the test of each string updated.
New or updated translations can be submitted to GitHub via Pull Requests to the repository
This is a known bug due to the localization layer that we are using, which allows translating into locales other than those present on the local device.
You can trigger the translation in full by restarting the app (force closing, loading the task chooser and killing the backstack for the app, or worst case restarting the device). Unfortunately I've looked into this bug, and it's actually quite difficult to fix, but we haven't perceived it as a blocker since the intent isn't to swap locales in real time but rather to just provide a mechanism to permanently change away from the current device locale.