Search code examples
angularjsangular-translate

Get current language with angular-translate


Is there a way to get the current used language in a controller (without $translateProvider)?

Couldn't find anything in the $translate service.


Solution

  • $translate.use() is a getter and setter.

    See this demo found in links of docs:

    http://jsfiddle.net/PascalPrecht/eUGWJ/7/