Change language tag of input fields to standard to enable spell checking (#140)

* change language tag from data-lang to lang to enable spell checking

See https://www.w3.org/International/questions/qa-html-language-declarations for reference

* change language tag from data-lang to lang in correspondence to i18n.py

change necessary to enable spell checking in textareas
This commit is contained in:
Unicorn-rzl
2016-05-28 13:20:55 +02:00
committed by Raphael Michel
parent e685f8e819
commit f3f5f8d049
2 changed files with 246 additions and 246 deletions

View File

@@ -121,7 +121,7 @@ class I18nWidget(forms.MultiWidget):
self.field = field
for lng in self.langcodes:
a = copy.copy(attrs) or {}
a['data-lang'] = lng
a['lang'] = lng
widgets.append(self.widget(attrs=a))
super().__init__(widgets, attrs)