Commit 5eb38789 authored by Michal Čihař's avatar Michal Čihař

Set language code for translated language

parent 9c595a35
......@@ -42,6 +42,7 @@ class PluralTextarea(forms.Textarea):
# Need to add extra class
attrs['class'] = 'translation'
attrs['tabindex'] = '100'
attrs['lang'] = lang.code
# Handle single item translation
if len(value) == 1:
......
......@@ -111,7 +111,7 @@ def fmttranslation(value, language = None, diff = None):
value = '<hr />'.join(parts)
return mark_safe(value)
return mark_safe('<span lang="%s">%s</span>' % (language.code, value))
@register.filter
@stringfilter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment