Best practice for two variants of a language

43 views
Skip to first unread message

Raphael Michel

unread,
Jul 29, 2015, 5:58:58 AM7/29/15
to django...@googlegroups.com
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

Avraham Serour

unread,
Jul 29, 2015, 6:09:12 AM7/29/15
to django...@googlegroups.com

I would create only one arrival locale and decide which one is the default, probably the de_de would be the formal and the new language weighs be for the informal.

As for the error messages I would just copy over the po for from django


--
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...@googlegroups.com.
To post to this group, send email to django...@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.
Reply all
Reply to author
Forward
0 new messages