Kahla.App icon indicating copy to clipboard operation
Kahla.App copied to clipboard

Investigate client side localization.

Open Anduin2017 opened this issue 5 years ago • 8 comments

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 avatar Feb 01 '20 15:02 Anduin2017

Question submitted to stackoverflow.

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

Anduin2017 avatar Feb 01 '20 15:02 Anduin2017

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

hv0905 avatar Feb 03 '20 02:02 hv0905

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 avatar Feb 03 '20 03:02 Anduin2017

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

Anduin2017 avatar Feb 06 '20 13:02 Anduin2017

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

hv0905 avatar Feb 06 '20 13:02 hv0905

Wow. Cool! So, just wait.

Anduin2017 avatar Feb 06 '20 13:02 Anduin2017

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

hv0905 avatar Mar 05 '20 05:03 hv0905

Ohh, that's so bad. Yeah.

Anduin2017 avatar Mar 05 '20 05:03 Anduin2017