Get current language with angular-translate

2019-01-30 13:18发布

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

Couldn't find anything in the $translate service.

7条回答
看我几分像从前
2楼-- · 2019-01-30 13:49

$translate.use() is the way to go. Also, when an asynchronous loader is executed, you might wanna use $translate.proposedLanguage() which returns the language key of the language that is currently loaded but not finished loaded yet.

查看更多
登录 后发表回答