Generator-jhipster: Upgrade to latest ng2-translate

Created on 25 Jan 2017  路  11Comments  路  Source: jhipster/generator-jhipster

The last time i tried to upgrade to latest ng2-translate version for the library I had so many issues. There wasnt any breaking change reported on the changelogs but somehow things were messed up. So I didnt upgrade.
Need to see if we can upgrade and fix issues after our Beta release

changes on-hold ng-jhipster

Most helpful comment

So you can't switch between the languages on the fly? The whole app needs to be re-loaded? Strange feature ...

All 11 comments

I didn't study it, but I saw there was now an official i18n support in
Angular 2, so this is like NG Router and probably we should migrate to it.

I would pass their option :smiling_imp:

The i18n template translation process has four phases:

Mark static text messages in your component templates for translation.

An angular i18n tool extracts the marked messages into an industry standard translation source file.

A translator edits that file, translating the extracted text messages into the target language, and returns the file to you.

The Angular compiler imports the completed translation files, replaces the original messages with translated text, and generates a new version of the application in the target language.

You need to build and deploy a separate version of the application for each supported language.

really I have to compile and deploy a separate app for each language?
This is why I'm starting to like React more and more as they dont force their stuff on to users and you are free to mix and match and still works. I really hate the direction Ng2 is going trying to do everything

So you can't switch between the languages on the fly? The whole app needs to be re-loaded? Strange feature ...

like most other strange design decisions of NG2

I'm definitely not a big fan of how the Angular team behaves and works....

I'm putting this on "hold", let's have a look after the JHipster 4 release.

Let's do this after v4: there is a lot of discussion to do here before deciding. So I'm removing the label.

The library has been renamed to ngx-translate

Good news is that ngx-translate author will work with Google on angular i18n:

https://twitter.com/OCombe/status/832878075968946176

The Angular team strongly advised to remove any "ng2" things in project names, as Angular 4 is coming, that's why some libs are renamed.

Judging from the demo, it doesn't seem like this requires you to have a separate app for each language. Maybe this has changed since January?

Was this page helpful?
0 / 5 - 0 ratings