Preferred languages?

329 views
Skip to first unread message

Pierre Mailhot

unread,
Dec 10, 2014, 4:46:21 PM12/10/14
to edx-...@googlegroups.com
I noticed today that a user could choose his preferred language on www.edx.org.

Will that feature be made available for Open edX? Or is it and I simply don't know how to turn it on?

Being from Montreal, having the possibility to choose English or French would be very useful for our users.

Nate Aune

unread,
Dec 10, 2014, 11:18:54 PM12/10/14
to edx-...@googlegroups.com
You might find more help by asking this question in the openedx-translation list:

Ali Hasan

unread,
Dec 11, 2014, 8:08:40 AM12/11/14
to edx-...@googlegroups.com
The feature is on openedx for a while now, all what you have to do is to config the languages on the admin panel

YourAwesomeDomain.com/admin/dark_lang/darklangconfig/

Enjoy

Pierre Mailhot

unread,
Dec 11, 2014, 2:07:12 PM12/11/14
to edx-...@googlegroups.com
I didn't know that! Works great too.

Thank you very much Ali.

Ned Batchelder

unread,
Dec 11, 2014, 3:09:16 PM12/11/14
to edx-...@googlegroups.com
The darklang feature is for testing languages that are not ready to be live yet.  Here are the directions for how to configure your server to support other languages: https://github.com/edx/edx-platform/wiki/Internationalization-and-localization

--Ned.

Pierre Mailhot

unread,
Dec 11, 2014, 3:36:05 PM12/11/14
to edx-...@googlegroups.com
But will it support concurrent languages? Can LANGUAGE_CODE support multiple values? It works when I use either Fr or En, but not when I use a list...

Sarina Canelake

unread,
Dec 12, 2014, 8:40:24 AM12/12/14
to edx-code
Yes - you have to add additional languages how Ali suggested:

YourAwesomeDomain.com/admin/dark_lang/darklangconfig/

The LANGUAGE_CODE variable is for your server's default language. And then to "release" a language, you have to turn them on in the dark lang config on the admin panel - do that by going to the admin url above, then adding language codes for all additional languages you wish to release in a comma separated list. For example, to release French and Chinese (China), you'd add

 fr, zh-cn

You don't need to add the language code for your server's default language, but it's no problem if you do.

Confusing, I know. The benefit of this is that you can preview languages before you release them by appending

?lang-code=xx

to the end of any url, and ?clear-lang to undo it. Example:

127.0.0.1:8000/dashboard?preview-lang=ar      # Shows your site in Arabic (if Arabic is unreleased in your instance)
127.0.0.1:8000/dashboard?clear-lang                # Resets your session

Pierre Mailhot

unread,
Dec 12, 2014, 10:51:48 AM12/12/14
to edx-...@googlegroups.com
Thanks Sarina, that's exactly what I ended up doing for supporting French and English.

Sarina Canelake

unread,
Dec 12, 2014, 4:28:00 PM12/12/14
to edx-code
Great, glad I could help! I updated the language instructions to reflect what was summarized in this thread; if you'd take a look and edit the instructions if I left anything out, that'd be great!

Pierre Mailhot

unread,
Dec 15, 2014, 11:04:34 AM12/15/14
to edx-...@googlegroups.com
Took a look at the new language instructions a few minutes. Looks good to me. Thank you.
Reply all
Reply to author
Forward
0 new messages