Language Selector Documentation

Overview

The platform chooses text to be displayed using a simple translation script placed in Client/src/assets/translation.js file. The file contain a simple lookup dictionary, where the keys are descriptors for each type of message to be displayed. And the value is another dictionary that lookup actual text based on language code as key.

Danger

The actual translated text may not be accurate at the moment, we welcome everyone contributing to improve language option on this page.

Method

dictionaryLookup(object, key, language)

Simple Dictionary Lookup function

Obtain text string based on language code and key string. If key string is not present in dictionary object, then return key as the text to be rendered.

Arguments
  • object (object()) – The dictionary object to search

  • key (string()) – Lookup which key inside the object

  • language (string()) – ISO 639-1 Code for Language [en for English or zh for Chinese]

Returns

string – the text string to be rendered.