title: Django access to language code in filter function
body: <p>I have some list of items in django template and I loop over this list to build a table od my records.
  In one of fields I have a dictionary key (int from 1 to 12). I wrote a filter to change key integers for a good looking names. I would like to check what is currently user language before filter returns. It is possible to check language code in filter/tag function in Django?</p>
  
  <p>This is my loop in template:</p>
  
  <pre><code>{% for field in fields_list %}
  &lt;div class="row row-eq-height"&gt;
      &lt;div class="col-padding-5"&gt;&lt;div class="cart-tab-row"&gt;{{ forloop.counter }}&lt;/div&gt;&lt;/div&gt;
      &lt;div class="col-padding-5"&gt;&lt;div class="cart-tab-row"&gt;{{ field.field_name }}&lt;/div&gt;&lt;/div&gt;
      &lt;div class="col-padding-5"&gt;&lt;div class="cart-tab-row"&gt;{{ trans field.c_type|get_cname }}&lt;/div&gt;&lt;/div&gt;
      &lt;div class="col-padding-5"&gt;&lt;div class="cart-tab-row"&gt;{{ field.area|floatformat:2 }}&lt;/div&gt;&lt;/div&gt;
      &lt;div class="col-padding-5"&gt;&lt;div class="cart-tab-row"&gt;{{ field.price|floatformat:2 }}&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>This is my filter function</p>
  
  <pre><code>@register.filter
  def get_cname(key):
      ctype = CesTypesDict.objects.filter(id=key)[0]
      return ctype.english_type_name
  </code></pre>
  
  <p>In normal view I access this information from request attribute, but in filter I don't have access to request object. </p>