title: How can I translate ActiveRecord model class name?
body: <p>What is the simplest way to get translated name of ActiveRecord model class when I have an instance of it?</p>
  
  <p>For example - I have model class like this:</p>
  
  <pre><code>class Category &lt; ActiveRecord::Base
    ...
  end
  </code></pre>
  
  <p>I have an instance of the class:</p>
  
  <pre><code>category = Category.first
  </code></pre>
  
  <p>And I have YAML file <code>config/locales/cs.yml</code>:</p>
  
  <pre><code>cs:
    activerecord:
      models:
        category: Kategorie
  </code></pre>
  
  <p>And I need to do this dynamicaly, even when I don't previously know with what model class' instance I will be dealing. So I don't want to explicitly specify "activerecord.models.category".</p>
  
  <p>Is there an easy way to do this? I know, that I can do something like this</p>
  
  <pre><code>"activerecord.models.#{category.class.name.underscore}"
  </code></pre>
  
  <p>But there has to be a better way to do this.</p>