transparentdemocracy / website

The frontend that visualizes the information obtained from the backend. Written in Angular.
1 stars 0 forks source link

Set language dictionary for EN, NL, FR,... #3

Closed idotj closed 1 month ago

idotj commented 2 months ago

Before the content starts to grow, will be better to set up the corresponding library to start using the dictionaries (en, nl, fr,...).

Most common options to translate in Angular:

sandervh14 commented 2 months ago

That would be great.

The mixed English and Dutch content originating is on us, the @transparentdemocracy/data team. Some descriptions contain both Dutch and English. I made our issue https://github.com/transparentdemocracy/voting-data/issues/7 high prio and next to fix.

But next to that, internatilaization on the website's visual elements is a welcome element too of course. I've showed our prototype already to my wife and she made a remark about the mixed languages.

idotj commented 2 months ago

I translated all text in Angular to Dutch. It's true that it's confusing to have components and strings mixed in both languages (NL and EN)

idotj commented 1 month ago

Created a branch with the i18n (Angular native) to check how to implement NL and FR

https://github.com/transparentdemocracy/website/tree/feat/i18n

Also I created another branch using ngx-translate:

https://github.com/transparentdemocracy/website/tree/feat/ngx-translate

idotj commented 1 month ago

At the end ngx-translate is the quickest and easy solution to apply and deploy. After playing with i18n localize from Angular, I can tell that is not a great solution for small projects!