Skip to content
Sterling (Jay) Scott edited this page Jul 25, 2017 · 2 revisions

Overview

Localizing the app ultimately consists of three things: Extracting UI elements, and Translating UI elements per the locale, and Replace new UI elements. There are libraries that handle most of these functionalities, and are not bad at it, but after consideration most are not worth the integration. It will be more efficient for our specific use case and also easier to implement our own extract/translate/replace.

Extract

  • Manually going through and finding all content from visual inspection of the app.
  • Create json files to represent UI elements in a data structure as such:
//homeScreen.json
"homeScreen":{
  "loginButton": {
    "text": "Login",
    "description": "Text to display on Login button"
    }
}
//Multiple nesting is also an option
  • Run script on json files and export csv in a format as such:
//strings.csv
"id", "text", "description"
"homeScreen-LoginButton", "Login", "Text to display on Login button"
  • Create git repository for managing changes to UI strings(also GLRP)

Translate

  • After strings are in a separate repo they can be translated and managed there without ever being in contact with tC
  • Pull request can be made to track changes as well as other git features
  • Once changes have been made on a version basis they are ready to be imported into tC

Replace

  • We will have to write an import script to receive the translation from the repo and inject them into the app.
    • This will be a redux implementation with the operator of all changes to UI strings being a reducer in the store.