diff --git a/examples/M-modules/quick/qml-lisp/qml/example.qml b/examples/M-modules/quick/qml-lisp/qml/example.qml index e96785f..c5d4ba9 100644 --- a/examples/M-modules/quick/qml-lisp/qml/example.qml +++ b/examples/M-modules/quick/qml-lisp/qml/example.qml @@ -36,6 +36,9 @@ Item { // (5) pass 'this' as first argument (can be accessed in Lisp via qml:*caller*) Lisp.call(this, "eql-user:show-properties-dialog") + + // (6) i18n + console.log(Lisp.tr("internationalization")) } Text { diff --git a/src/eql5.js b/src/eql5.js index 4edaa50..8ab4429 100644 --- a/src/eql5.js +++ b/src/eql5.js @@ -51,3 +51,7 @@ function apply(arg1, arg2, arg3) { name = arg1; args = arg2; } return checkEval(EQL5.apply(caller, name, args)); } + +function tr(source, context, pluralNumber) { + // for i18n + return EQL5.apply(null, "eql:qtranslate", [context, source, (typeof(pluralNumber) == "number") ? pluralNumber : 0]); }