Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
Partner
Partner

Translation keys inside template?

Is it possible to access the translation keys inside the template without using the q-title-translation attribute?

Something like this:

<span>

    {{example.of.translation.key}}

</span>

1 Solution

Accepted Solutions
Partner
Partner

Re: Translation keys inside template?

Found a way to achieve this:

define( [

        'qlik',

        'jquery',

        'text!./template.html',

        'translator'

    ],

    function ( qlik, $, template, translator ) {

        'use strict';

        return {

            support: {

                snapshot: false,

                export: false,

                exportData: false

            },

            template: template,

            paint: function ($element, layout) {

                return qlik.Promise.resolve();

            },

            controller: ['$scope', function($scope){

                var translatedSheet = translator.get("Common.Sheet");

                console.log("translatedSheet", translatedSheet);

            }]

        };

    });

1 Reply
Partner
Partner

Re: Translation keys inside template?

Found a way to achieve this:

define( [

        'qlik',

        'jquery',

        'text!./template.html',

        'translator'

    ],

    function ( qlik, $, template, translator ) {

        'use strict';

        return {

            support: {

                snapshot: false,

                export: false,

                exportData: false

            },

            template: template,

            paint: function ($element, layout) {

                return qlik.Promise.resolve();

            },

            controller: ['$scope', function($scope){

                var translatedSheet = translator.get("Common.Sheet");

                console.log("translatedSheet", translatedSheet);

            }]

        };

    });