cms-dev/cms — pull request #283 by artikz (2014-04-03 12:56:14+00:00)
Title: Add some gui control on contestant interface localisation

Admins have two new options for a contest:
allow_language_switching - whether the contestant allowed to switch languages
gui_languages - the JSON-encoded list of languages that are allowed to use by contestants

In case admins allowed contestants to switch language, contestants will have a drop-down list of languages in the top-right corner. The default language will be the language of a browser (as it was before).

If gui_languages is empty, or is an empty array, all available languages will be allowed. In case the array contains only one element - this language will be forced and contestant will not be able to switch language.

Language names are shown in the language that is selected (so it will be "English, Italian", or "Inglese, Italiano"). It would be better to show language name in the same language (like "English, Italiano"), but I didn't figure out how to do this without adding more external dependencies or parsing .mo files.