AngularTranslate tutorial
Hi team,
Is there any chance you could add a tutorial for AngularTranslate implementation, i the same way you've done i18next for JQ builds, please?
(Or some other Angular translation module, if not).
Regards,
Andy
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hi team,
Is there any chance you could add a tutorial for AngularTranslate implementation, i the same way you've done i18next for JQ builds, please?
(Or some other Angular translation module, if not).
Regards,
Andy
Hello Andrew,
We passed your request to our development team and will get back to you with the update.
Thanks Evgene.
Hi Andrew,
We have published a Development Tip in our blog, please check it out: https://blog.appery.io/2016/03/develo...
Thanks Illya, I just saw that! Appreciate the prompt and helpful support
Andy
Hi
I'm almost there - if I use
$translateProvider.preferredLanguage('de');
or
$translateProvider.preferredLanguage('en');
the translation works. So thanks again for your tutorial.
But there's just one thing I'm stuck on - how to change the language dynamically.
I thought it would be:
code
var $translate = Apperyio.get('$translate');
$translate.use(languageCode);
/code
where languageCode is passed in as "en" or "de" in your tutorial. But that doesn't seem to do anything, even though $translate is defined, and can be logged to console as:
code
function (a,b,c,h,j){var m=j&&j!==i?L(j)j:i;if(angular.isArray(a)){var n=function(a){for(var e={},f=[],g=function(a){var f=d.defer(),g=function(b){e[a]=b,f.resolve([a,b])};return R(a,b,c,h,j).then(g,g),f.promise},i=0,k=a.length;k>i;i++)f.push(g(a));return d.all(f).then(function(){return e})};return n(a)}var o=d.defer();a&&(a=K.apply(a));var p=function(){var a=e?I[e]:I[m];if(l=0,k&&!a){var b=f.get(v);if(a=I,g&&g.length){var c=J(g,b);l=0===c?1:0,J(g,e)<0&&g.push(e)}}return a}();if(p){var q=function(){j(m=i),ca(a,b,c,h,m).then(o.resolve,o.reject)};q.displayName="promiseResolved",p"finally"}else ca(a,b,c,h,m).then(o.resolve,o.reject);return o.promise}/code
Any inspiration you can share?
Regards,
Andy
Ooh, I lied. I've just republished to make another change, and it's working. Bizarre.
Apologies for the confusion.
Great support from the team - pass on my regards to everyone concerned!
Regards,
Andy
Would you mind to tell me what solution did you use to solve the problem, I cannot change the language dynamically
I'm not sure, it just started working. I'll tease out the code later tonight and share here in case it helps.
Thank you, I tried your code:
code
var $translate = Apperyio.get('$translate');
$translate.use("de");/code
but somehow it doesn't work for me