discourse/discourse — pull request #1922 by joallard (2014-02-09 01:56:15+00:00)
Title: Allow users to toggle interface language in their preferences

This was a [feature request discussed on meta.discourse](https://meta.discourse.org/t/multiple-languages-on-single-discourse-site/8269). We wanted the users to be able to have the interface in their preferred language, as this is an important issue in some places (Canada, Belgium, ...).

The feature is disabled by default and can be enabled with the `allow_user_locale` setting.

### Considerations
The user might or might not have a preference. If the `locale` preference is empty, the user will receive the default language of the application.

### Questions
* I have been trying to see where to insert tests before implementing this, to no avail. Should I bother? If so, could you point me in which part tests would be appropriate?
* As it is, the user can choose to leave no preference. However, the dropdown on user preferences has no blank option. ie. once they choose, they can't go back to "uncommitted-default". How do you add a none option in the Combobox view?
* Even if the locale selection is disabled, the user could update their locale by direct request. Is this a problem?

### Thanks
This is my first time in Ember or any large JS framework. A huge merci to @zogstrip for his detailed instructions on how to implement this, I would've otherwise spent hours looking for stuff. Thanks also to @tedstrauss, @coding-horror, @samsaffron and others for their feedback and patience. And finally, the reason I took the time to discuss that feature and implement it is I think the Discourse project is awesome. Thanks for having created and maintaining this so well! You've made the internet a huge favor.