 
   constructor: ->
     preferredLanguage = localStorage.preferredLanguage || DEFAULT
+    HTML.attr 'data-language', preferredLanguage
 
     @el = $("<select class='#{@className}'></select>")
 

$ = require 'jqueryify'
translate = require 't7e'
enUs = require '../translations/en_us'

DEFAULT = '$DEFAULT'



  onChange: ->
    preferredLanguage = @el.val()
    HTML.attr 'data-language', preferredLanguage

    localStorage.preferredLanguage = preferredLanguage

    if preferredLanguage is DEFAULT
