Collection of helpers for multilingual websites.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
319 B

# Erik Stein <code@classlibrary.net>, 2017
from collections import OrderedDict
from django.conf import settings
from shared.utils.translation import lang_suffix
def i18n_fields(field_name, languages=None):
return [lang_suffix(l, field_name) for l in languages or
OrderedDict(settings.LANGUAGES).keys()]