Angular translate: overriding preferredLanguage in controller

281 views Asked by At

I use Angular Translate to localize my web app. Our backoffice users can set the language of a specified item, and see a live preview of this item. For instance: a native Dutch speaker uses the app in Dutch. However, the item is set to English.

The live preview of the item should use the English versions of the previewed content, but since Angular Translate set the preferred language to Dutch, the previewed content stays Dutch.

Is it possible to change the language for a few strings only? This could be in the controller (override all languages for values inside the controller $scope), or even in the directive / filter with an option <div translate="translateKey" translate-language="EN"></div>

I'm asking to see if something like this exists, otherwise I will either try to create it myself, or ask the developers at Angular Translate to develop this feature if they find the time.

0

There are 0 answers