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

Switch language in navbar from ISO codes to actual language name #3385

Closed
misaugstad opened this issue Sep 18, 2023 · 1 comment · Fixed by #3422
Closed

Switch language in navbar from ISO codes to actual language name #3385

misaugstad opened this issue Sep 18, 2023 · 1 comment · Fixed by #3422

Comments

@misaugstad
Copy link
Member

Brief description of problem/feature

I believe that we used ISO codes to save space in the navbar, but at this point it's probably worth it to use the actual language names, especially since we've included Chinese that doesn't even use the same script!
en-US: US English
en-NZ: NZ English
en: English
es: Español
nl: Nederlandse
de: Deutsch
zh-TW: 繁體中文

It probably makes the most sense not to translate the language names. If you're looking for a specific language, you probably can read in that language and know it's name :)

@misaugstad
Copy link
Member Author

I think that this should be pretty easy, and I don't foresee any breaking changes by doing this.

First, add text for each of these in the conf/messages file (the conf/messages.* files are for specific languages and they override conf/messages, but conf/messages matches any language).

lang.name.en-US = US English
lang.name.en-NZ = NZ English
...

Then get the text in navbar.scala.html by replacing @language with @Messages(s"lang.name.$language").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants