Namespace: lang

CTS. lang

Members

<static> lexicons :Object.<string, Object.<string, string>>

Dictionary of lexicons
Type:
  • Object.<string, Object.<string, string>>
Example
 {en : {"object" : "Object", "cat" : "Cat"}, "fr" : {"cat" : "Chat"}}

Methods

<static> get(word, lang) → {string}

Get the given work into a given language
Parameters:
Name Type Argument Description
word string Word identifier to get
lang string <nullable>
Lang code (Default is English)
Returns:
The pretty words to print
Type
string
Example
  Using dictionary example given for CTS.lang.lexicons
CTS.lang.get("cat")
// Returns cat
CTS.lang.get("cat", "fr")
// Returns Chat
CTS.lang.get("object", "fr")
// Return Object