Is there a way to get the current used language in a controller (without $translateProvider
)?
Couldn't find anything in the $translate
service.
$translate.use()
is a getter and setter.
See this demo found in links of docs:
http://jsfiddle.net/PascalPrecht/eUGWJ/7/
$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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With