UI Text

The UI text is made up of strings, stored in a key-value pair format.

A complete list of keys and their matching strings is found in client/default/strings/master/en-US.json. While this list shows all the keys, you must override any changes you’d like to make by entering those keys and their edited strings in institutions/mxmobile/strings/master/en-US.json.

For a list of keys you can edit as they relate to each view, refer to the UI text sections throughout the features and views reference.

To change some UI text:

  1. Open institutions/mxmobile/strings/master/en-US.json.
  2. Add a key.
  3. Set its value to your desired text.
  4. Run ./generate to regenerate en-US.json.

Here’s an example adding the USERNAME key with an empty string:

The String Table


FAQs

You can customize the FAQs section by changing the questions, answers, and by adding new sections.

faqs.json lists out the keys that are listed in en-US.json.

To add a new FAQ:

  1. Copy client/default/config/faqs.json to institutions/mxmobile/config/faqs.json.
  2. Add a key to an existing section or create a new section and enter your key there.
  3. Open institutions/mxmobile/strings/master/en-US.json. Copy the FAQ header, FAQ question, and FAQ answer objects from client/default/strings/master/en-US.json.
  4. If you added a new section, search for the FAQ header object. Add your key for this new section in its Table object.
  5. Search for the FAQ question object. Add your key in its Table object and enter your question.
  6. Search for the FAQ answer object. Add your key in its Table object and enter the matching answer.
  7. Run ./generate.

Localize Text

When a user changes the language on their mobile device, the app will use the respective translation file.

Translation files in the client folder:

  • English (Canada) — client/default/strings/translated/en-CA.json
  • French (Canada) — client/default/strings/translated/fr-CA.json
  • Spanish (United States) —client/default/strings/translated/es-US.json

Translation files in the institutions folder:

  • English (Canada) — institutions/mxmobile/strings/translated/en-CA.json
  • French (Canada) — institutions/mxmobile/strings/translated/fr-CA.json
  • Spanish (United States) — institutions/mxmobile/strings/translated/es-US.json

The translation files in the client folder list out some, but not all, keys and their translated strings. Compare the keys to client/default/strings/master/en-US.json and ensure all strings are there. If they are not, add them. If you do not, you risk your UI displaying any non-defined strings in English.

The translation files in the institutions folder is where you enter specific keys and their strings to override the default text that’s displayed. This involves copying the contents from the translation files in the client folder.


OS Modals (iOS)

You can localize the text on the modal that appears when:

  • You’re requesting a user’s permission.
  • A user clicks and holds the app icon.

Open proj.apple/Localizations/, select one of the folders, then open and edit InfoPlist.strings.