AiursoftWeb / Kahla.App

Kahla is a cross-platform business messaging app.
https://www.kahla.app
MIT License
416 stars 85 forks source link

Investigate client side localization. #774

Open Anduin2017 opened 4 years ago

Anduin2017 commented 4 years ago

What do you suggest we do?

image

Now that we have produced many versions of the Kahla app. But the app still could not switch between multiple languages.

I have read the Angular localization document. But it seems that localization was done in the building process. After the app is built, it can't be changed.

As we all known, Kahla is deployed behind a CDN. The CDN servers reverse-proxy Kahla will cache all files passed. Server-side app localization is not available.

And we have provided client-side Kahla based on the electron. We shall deliver the app once and the user can switch between different languages easily. Current Angular localization can't make it.

So is there any way for us to deliver the Kahla app with multiple languages switchable?

Additional context

https://angular.io/guide/i18n

Anduin2017 commented 4 years ago

Question submitted to stackoverflow.

https://stackoverflow.com/questions/60018146/angular-client-side-language-switching

hv0905 commented 4 years ago

The i18n team seems WIP to support client side multilanguage (checkout this issue)

And there is a library can make it called ngx-translate and transloco

Anduin2017 commented 4 years ago

Seems ngx-translate have so many stars and considered to be trusted.

So we need to investigate if it is suitable for our current app.

Anduin2017 commented 4 years ago

Seems ngx-translate is deprecated. Seems the only solution for us is transloco.

hv0905 commented 4 years ago

I think we can wait for angular v9.1 in which the client-side locallize is natively support in angular.

Anduin2017 commented 4 years ago

Wow. Cool! So, just wait.

hv0905 commented 4 years ago

It seems client-side locallization won't be available in ng9 now. We have to use transloco.

Anduin2017 commented 4 years ago

Ohh, that's so bad. Yeah.