Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.changeLanguage = function (langKey) {
$translate.use(langKey);
var languagecode = $translate.proposedLanguage() || $translate.use();
console.log (languagecode);
$scope.language = {
code: languagecode,
title: available[languagecode]
};
mixpanel.language (langKey);
library.storeValue ('language', languagecode);
};
});
library.retrieveValue ('language', null, function (language)
{
if (language)
{
that.changeLanguage (language);
}
else
{
mixpanel.language ($translate.use ());
}
});