Wednesday, July 29, 2015

Best practice for two variants of a language

Hello,

I develop an open source web application in Django that is available in
multiple languages, translated using Django's gettext features. However,
in my native language German (and many others, too), there are strong
differences between formal and informal style (in German there is even
a formal and an informal word for "you").

Some of my users need to use formal language and others need to use
informal language and both have good reasons for that. So my question
is: Is there a best practice on how to implement this?

Contextual markers[1] are not an option, because you'd have to scatter
the decision all over the code base, so you need to have different
translation files for the different styles.

I could use different gettext domains, but this would be pretty
non-standard as Django normally uses only the "django" and "djangojs"
domains.

I could also abuse language code by using "de-formal" and "de-informal"
instead of "de", but this would break Django's own translations (e.g.
of validation error messages).

Has anyone solved this problem in an elegant way before?

Cheers,
Raphael


[1]
https://docs.djangoproject.com/en/dev/topics/i18n/translation/#contextual-markers

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20150729115805.4e53c25f%40kvothe.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment