p2-inc / phasetwo-admin-portal

Other
18 stars 14 forks source link

[Question] Localization & Translation #121

Closed GME-O closed 6 months ago

GME-O commented 7 months ago

Hi

I have a question regarding Admin Portal translation. Is it possible to setup multiple language / translations and let the user change language like in Keycloak with the login theme ? (or automatically switch based on user's localization attributes).

I see that on admin portal you can specify a localization, but the UI is not translated. Is it possible to configure or customize that ?

Thanks in advance Best regards,

xgp commented 7 months ago

Theoretically the infrastructure is there for it

All the messages live in https://github.com/p2-inc/phasetwo-admin-portal/tree/main/public/locales/

and it gets setup here https://github.com/p2-inc/phasetwo-admin-portal/blob/main/src/i18n.ts

but we've never had anyone use anything but English.

I'd suggest trying adding another language, and then PR if it requires changes to get it working.

GME-O commented 7 months ago

Thanks for your quick answer!

That's because you don't know french customer 😄 even a wrong translation is reported to us.

As I'm using https://github.com/p2-inc/phasetwo-containers for exploration & testing, I guess it would require to get both, add translation in admin-portal and re-build a custom image with the updated admin portal (including translation) ?

Thanks again

xgp commented 7 months ago

Yes, you'd have to rebuild this and then override the phasetwo-admin-portal jar in the /opt/keycloak/providers/ dir and rebuild.

pnzrr commented 6 months ago

@GME-O we now have a French translation. Going to close the issue

https://github.com/p2-inc/phasetwo-admin-portal/pull/123

MGLL commented 6 months ago

@pnzrr I know :) (it was my other account). Have a good day

pnzrr commented 6 months ago

Ha ok, i wondered but wasn't sure

On Tue, Jan 16, 2024 at 1:12 AM Guillaume M. @.***> wrote:

@pnzrr https://github.com/pnzrr I know :) (it was my other account). Have a good day

— Reply to this email directly, view it on GitHub https://github.com/p2-inc/phasetwo-admin-portal/issues/121#issuecomment-1893247485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWL6TAC7AE2CJ654I5OSEWTYOYY5TAVCNFSM6AAAAABAWUGO2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJTGI2DONBYGU . You are receiving this because you were mentioned.Message ID: @.***>