Please add full featured i18n utility
Current i18n support is too weak.
Can you be more concrete?
Are you referring to supporting translation strings or something else?
Yeah, I mean string translation. Currently, only filters can be localized, which is not enough for building multi-language sites.
Maybe a built-in $i18n service can be added?
+1 over here, any recommended way of doing string translation ?
I've seen these:
- https://github.com/StephanHoyer/ng-translate
- https://groups.google.com/forum/?fromgroups#!topic/angular/9C1F6PJ5KVY
- https://github.com/Jehu/Angular-Addons
Any suggestion, or choice to be made ?
It'd be a nice thing to have. However, translated resources files are usually big and we shouldn't push all the strings at once into users browser. At least not every language.
Why is translating the views to different languages not sufficient?
Hi Miško,
I think that rewriting all views for every language is less DRY than translating only the strings in each view. Without an option to translate strings, you'd have to replicate a layout change in every view you'd have.
I'm not sure if it should be always done in angularJS, but I think it's a nice fature to have. It's not critical, but it'd be nice to have.
There should be a tool which would extract the strings from views and generate translations. We have such a tool internal at Google, I would assume that there would be something similar in open source software. In any case we consider that outside of the scope of angular for now. On Sep 12, 2012 6:08 AM, "Mário Melo" [email protected] wrote:
Hi Miško,
I think that rewriting all views for every language is less DRY than translating only the strings in each view. Without an option to translate strings, you'd have to replicate a layout change in every view you'd have.
I'm not sure if it should be always done in angularJS, but I think it's a nice fature to have. It's not critical, but it'd be nice to have.
— Reply to this email directly or view it on GitHubhttps://github.com/angular/angular.js/issues/1003#issuecomment-8492817.
I really need this, too. I just can't live without this after using Symfony translations.
+1 here too. Keep up the good work ;-)
Alternatively you can use requireJS i18n plugin to handle i18n strings. But ultimately I hope that Angular could have native support for i18n. +1 for this feature :-)
+1 on string translation support. I am working on data entry forms for 56 science protocols, each of which needs translations for half a dozen languages.
One of the improvments that could be implemented in AngularJS about translation of views is to translate view before putting it into templateCache and ten put translated version there.
This way we can avoid translation of same view multiple times when user navigates on it.
But I am not sure this could be done only by directives without modification of Angular....
+1 for @olostan suggestion.
+1 This is very important!
+1 for full featured localization
At work, our Java backend serves all template files with strings translated according to the current users preferred language. Text that needs translation are simply wrapped in square brackets. These are replaced by a specific servlet for that purpose. E.g. <span>[[ Some text to translate ]]</span>. The replacing is done by a simple regular expression.
Sometimes this is not enough, e.g. when receiving dynamic validation messages. In this case we have a simple REST service that return translations.
i18next is a full featured javascript library/jquery plugin for internationalisation.
Since I'm currently also need i18n in an angular app, I decided to develop a module which takes care of it. Notice: I didn't know the other implementations on the interwebs before publishing. Nevertheless, each module follows its own approach. Unfortunately non of'em really fits to my needs. So if you guys still interested in making i18n possible in angular apps, checkout this one:
Feedback is very welcome!