title: sunspot with i18n framework in rails 3.2
body: <p>I'm using <a href="https://github.com/sunspot/sunspot" rel="nofollow">sunpost gem</a> for search in my rails project.</p>
  
  <p>I have now two languages in my app:</p>
  
  <pre><code>I18n.default_locale = :en
  LANGUAGES = [
  ['English',
  'en'],
  ["Espa&amp;ntilde;ol".html_safe, 'es']
  ]
  </code></pre>
  
  <p>I have in my <strong>post.rb</strong> model, a language attribute that contains the value <strong>"es"</strong> for spanish language or value <strong>"en"</strong> for english language.</p>
  
  <p>I have in <strong>posts_controller</strong> in <strong>index action</strong> the next method:</p>
  
  <pre><code>def index
     @search = Post.solr_search do |s|
       s.fulltext params[:search]
       s.keywords params[:search]
       s.order_by :created_at, :desc
       s.paginate :page =&gt; params[:page], :per_page =&gt; 20
     end
  
     @posts = @search.results
  
      respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml =&gt; @posts }
      format.js
    end 
   end
  </code></pre>
  
  <p>I get the current language with <code>I18n.locale.to_s</code> I get with this code <strong>"es"</strong> or <strong>"en"</strong></p>
  
  <p><strong>My question is: How can I only show the results for the language currently in use by user in my website?</strong></p>
  
  <p>Thank you very much!</p>