Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
138 lines (109 sloc) 2.96 KB

{{ properties: { category: "extended api" } }}

Mojo supports internationalization with with the mojo-i18n module.


npm install mojo-i18n --save-exact

Basic Example

{{#example}} {{#block:"index-js"}}

{{/}} {{#block:"template-pc"}}

{{/}} {{/}}


The available translations for the application.

  "locale": {
    "path": {
      "to": "translation __with__ __optional__ __params__"


The locale of the application. This can be dynamically changed without reloading the application.

Template Modifiers

t(params[, alternativeText])

translates the given string with the provided params - params are defined within the template as param. If the translation doesn't exist, the alternative text is used instead.

{{ "messages.hello" | t(null, "Hello world") }}