1

I want to translate strings which are set in my AngularJS code like controller, component and config etc.

For example:

    c8yTitle.changeTitle({
        title: "Another app"
    });

For HTML resources it is working fine, i generated from ".pot" file which is generated during build an ".po" file by using Poedit.

However, the title see above i don't see in my pot file, how can i configure it that i also can translate all this titles in my controller?

apes
  • 87
  • 8

1 Answers1

1

I got it:

just inject gettext

function Controller($scope, c8yTitle, gettext) 

and

        c8yTitle.changeTitle({
            title: gettext('Another app'),
        });
apes
  • 87
  • 8