4.7 Expand Application Dictionaries - mmig/mmir GitHub Wiki
Expand Application Dictionaries
By default, StarterKit example supports two languages: German and English (plus a very basic support for Japanese).
To expand the English dictionary you have to edit www/config/languages/en/dictionary.json.
Open it in Eclipse and add the following key value pairs to the JSON definition of your dictionary.
{
  "create_appointment": "Make an appointment",
  "create_appointment_header":"Appointment",
  "date_label" : "Date",
  "start_time_label":"Start",
  "end_time_label":"End",
  "subject_label":"Subject",
  "save":"Save",
  "discard":"Discard"
}
If your new application should support German language, you have to expand the German dictionary also.
Open www/config/languages/de/dictionary.json and insert the following key value pairs into
the definition of your German dictionary.
{
  "create_appointment": "Termin erstellen",
  "create_appointment_header":"Termin",
  "date_label" : "Datum",
  "start_time_label":"Start",
  "end_time_label":"Ende",
  "subject_label":"Betreff",
  "save":"Speichern",
  "discard":"Verwerfen"
}
For example, the defined value create_appointment can be used in views with the expression @localize("create_appointment" (see Template Expressions), or in JavaScript via the LanguageManager mmir.lang.getText("create_appointment").
< previous: "Expanding Models" | next: "Expand Dialog Description (SCXML)" >