Skip to main content

Introduction

Application translations made easy, but complex enough to have some docs so have at it!

In order to have proper translations, in any given number of languages, we utilize the platform Lokalise. They offer tons of features to make translations easy and adjustable without requiring a developper to process every single change. On top of that they also provide a means to hand over the files to native translators to handle a specific language. This isn't in app, but it's at least a lot better than machine translations.

Every frontend is intended to have its own singular project in lokalise so you don't need to worry about other frontends for keys etc. But just as important we need a single project to be keep it scalable and manageble to have it translated. Every file needs to be exported in .xliff in bilingual view, in order to support incremental updates and keeping the existing translations unmodified. Since this is per language per project this easily goes up if a frontend uses more than 1 lokalise project. 15 languages * project quantity would currently mean (CAPP / POS / CFD / EVAPay) 60 files already where App Suite and EVA Suite aren't translated yet. So you can see how quickly this escalates if you have projects per suite module or customer.

There are currently 3 different implementations of how translations are being managed:

  • JSON export to Github for a PR (CAPP/EVAPay)
  • Frontends fetching dynamic, published content through Customer Manager, with a fall back to build time translations (POS)
  • Frontends fetching dynamic, published content through Lokalise iOS SDK, with a fall back to build time translations (CFD / App Suite)

So how to get new translations live for those different implementations.

JSON github:

Go the the project download and keep the file format on JSON. Let it write 1 file per language with the following structure: src/assets/i18n/%LANG_ISO%.%FORMAT%

EVAPAY has a different structure:src/i18n/%LANG_ISO%.%FORMAT% 

git pr 1

Export all data

Set Empty translations to 'Replace with base language' // empty strings would break the application fallback to english Sort keys A-Z Plural = Array Placeholder format = i18n indentation = 2 spaces

Git pr

App trigger check Github and select the repo from the dropdown Dont forget to add a commit message

Click Build to create the PR in Github so it can be merged there.

Dynamic Customer Manager

Go the the project download and keep the file format on JSON. Let it write 1 file per language with the following structure: src/assets/i18n/%LANG_ISO%.%FORMAT%

Export all data

Set Empty translations to 'Replace with base language' // empty strings would break the application fallback to english Sort keys A-Z Plural = Array Placeholder format = i18n indentation = 2 spaces

Press build only and then go to the Customer Manager to publish it

CM Publish

Dynamic Lokalise iOS SDK

Go the the project download and set the file format to Lokalise iOS SDK Lokalise iOS SDK

Set Empty translations to 'Replace with base language' // empty strings would break the application fallback to english

Press build only

Then go the the project settings and mark the new build as production and press save below. It will be live everywhere ! iOS SDK