def select
      @inline_translations_allowed = false
      @inline_translations_enabled = false
    
      if tr8n_current_user_is_translator? 
        unless tr8n_current_translator.blocked?
          @inline_translations_allowed = true
          @inline_translations_enabled = tr8n_current_translator.enable_inline_translations?
        end
      else
        @inline_translations_allowed = Tr8n::Config.open_registration_mode?
      end
    
      @inline_translations_allowed = true if tr8n_current_user_is_admin?
    
      @source_url = request.env['HTTP_REFERER']
      @source_url.gsub!("locale", "previous_locale") if @source_url
    
      @all_languages = Tr8n::Language.enabled_languages
      @user_languages = Tr8n::LanguageUser.languages_for(tr8n_current_user) unless tr8n_current_user_is_guest?
    
      render_lightbox
    end
def select
      @inline_translations_allowed = false
      @inline_translations_enabled = false
    
      if tr8n_current_user_is_translator? 
        unless tr8n_current_translator.blocked?
          @inline_translations_allowed = true
          @inline_translations_enabled = tr8n_current_translator.enable_inline_translations?
        end
      else
        @inline_translations_allowed = Tr8n::Config.open_registration_mode?
      end
    
      @inline_translations_allowed = true if tr8n_current_user_is_admin?
    
      @source_url = request.env['HTTP_REFERER']
      @source_url.gsub!("locale", "previous_locale") if @source_url
    
      @all_languages = Tr8n::Language.enabled_languages
      @user_languages = Tr8n::LanguageUser.languages_for(tr8n_current_user) unless tr8n_current_user_is_guest?
    
      render_lightbox
    end
language selector window