Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translation and internationalization #11

Open
stregouet opened this issue May 14, 2020 · 1 comment
Open

translation and internationalization #11

stregouet opened this issue May 14, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@stregouet
Copy link

Hi,
thanks for providing this good hydra companion :)
I'd like to install it for some french users but it will be easier for them if we can translate UI.
I can work on it, but I don't know anything about i18n stuff with golang, do you have any opinion? A library of choice?

@nikolaas
Copy link
Contributor

Hello.

In my opinion, the best way to translate the login page is to translate it into JavaScript. Now there are many cases when the page is rendering using ReactJS, AngularJS and etc. So almost all content of the page is into minified JavaScript files. We will have to impose restrictions on writing the UI to find all strings requiring translation. It's much easier if the UI will translate itself on his own.

I can add the value of the header Accept-Language to the template data. After that, you can render this value on the login page and then use any of existed JavaScript translation libraries.

Does this solution suit for you?

nikolaas added a commit to nikolaas/werther that referenced this issue Nov 17, 2020
nikolaas added a commit to nikolaas/werther that referenced this issue Nov 17, 2020
@konstlepa konstlepa added the enhancement New feature or request label Nov 22, 2020
nikolaas added a commit to nikolaas/werther that referenced this issue Jan 12, 2021
nikolaas added a commit to nikolaas/werther that referenced this issue Jan 12, 2021
nikolaas added a commit to nikolaas/werther that referenced this issue Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants