Is there any way to let language selector display 'English' instead of 'en'?


(Ying Long) #1

I’d like to have the language selector be more human readable, any ideas?


(Michael Brown) #2

What’s wrong with just showing ‘en’?

I suppose we could add a link to the list. I’d hazard a guess that if you work with computers and aren’t English, you know what your code is. But my sample size is too small.

If anything, I’d suggest changing the list to include the native name, for instance:

  • en (English)
  • fr (Français)
  • gd (Gàidhlig)

(Ying Long) #3

You are right, I’m working on a multi-language forum.
Consider users who know little about computer, they are hard to find the correct language by the unfamiliar language code. Add the native name will be user friendly.


(Michael Brown) #4

Hmm… on that note, we should be detecting the user’s language setting in their browser and switching the UI locale automatically.

(Just tested on FF, not working).

@zogstrip Zut alors!


(Jeff Atwood) #5

This is a good idea and I believe it is on @techapj’s list.


(Sam Saffron) #6

This is now complete in the admin section.

Per:

If admins enables user locales then we don’t get it :cry:

However user locale selection is kind of rare, #pr-welcome to make the user selector consistent with admin.


Inconsistent locale selection in admin and user settings
Multilingual sites: ask for preferred language at registration
Interface language selection
Interface language selection
(Carson) #7

Hi, sorry for the question, but I’m confused.

If I turn OFF “Allow users to choose their own language interface preference” then the interface language selector is not available. So… how will Spanish speaking users be able to have the interface be in Spanish? It seems that they would not be able to do so.

Alternatively, if I turn ON this feature, then the list appears per the screenshot above and is #pr-welcome. It would be excellent for the user view to be the same as the admin view.

Am I missing another option whereby Discourse automatically recognizes a user’s desired interface and gives them their language choice from the first time they visit the forum?


(Quim Gil) #8

This thread is specifically about displaying “English” instead of “en”. About your question, there is a more recent discussion at Multilingual sites: ask for preferred language at registration

Short answer: the closest you will get to your scenario is by checking these options in Settings > Basic setup:

  • Allow users to choose their own language interface preference
  • set interface language for anonymous users from their web browser’s language headers. (EXPERIMENTAL, does not work with anonymous cache)

(Simon Cossar) #9

The language selector on the user preferences page now displays the full name of the language:

32%20PM


(Sam Saffron) #10