In this repo you will find the function I use within Ceri Launcher to handle translations.
Strings passed through this function are checked for translations in the user's chosen language. If no suitable translation exists, the original string (in English) is returned.
The function has been separated into individual languages for easier contributions.
Say you wanted to add the translation for "All apps" in German, as you noticed it to be missing within the app.
- Open
translations/german.dart
- Ctrl+F to find the line which handles translation for "All apps":
case "All apps":
return text;
return text
indicates the translation is missing. To add your new translation, replacetext
with the correct translation in quotation marks (""
):
case "All apps":
return "Alle Apps";
- Then just submit a pull request with your changes to the GitHub repo.
Thank you for your help -- any and all contributions are greatly appreciated!
- jckpn