# New option: auto-select language by HTTP header

**URL:** <https://meta.discourse.org/t/new-option-auto-select-language-by-http-header/35697>\
**Category:** Feature\
**Created:** [11월 17, 2015, 2:34오후 UTC](https://meta.discourse.org/t/new-option-auto-select-language-by-http-header/35697 "2015-11-17T14:34:24Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [11월 19, 2015, 4:25오후 UTC](https://meta.discourse.org/t/new-option-auto-select-language-by-http-header/35697/11 "2015-11-19T16:25:18Z")

</div>

I think you need to update your version of discourse. `ensure_all_loaded!` was recently added.

Here’s the main method that the plugin is overriding from `application_controller.rb`

```rb
  def set_locale
    I18n.locale = current_user.try(:effective_locale) || SiteSetting.default_locale
    I18n.ensure_all_loaded!
  end

```

---

_[View the full topic](https://meta.discourse.org/t/new-option-auto-select-language-by-http-header/35697)._
