4

In German there is a formal ("Sie") and an informal ("Du") form. I would like to translate some software into informal German, notably woocommerce using transiflex, but new languages can only be added using their locale code.

There only seems to be de_DE as a locale. What's best to differentiate between the two forms, shouldn't there be another locale code just for the informal form, too?

nachtigall
  • 2,447
  • 2
  • 27
  • 35

3 Answers3

7

Generally Gettext uses @ to distinguish language variants. So in this case it could be de_DE@informal. This way the locale will be correctly handled by Gettext with fallback to de_DE (in contrast with suggested de_DE-x-informal which will not fall back this way as Gettext will see DE-x-informal as country code).

You can find more on locales naming at https://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html

Michal Čihař
  • 9,799
  • 6
  • 49
  • 87
3

Since you asked about WooCommerce, explaining the current state of how WordPress handles it is probably most relevant:

The best approach is to use locale variants as Michal wrote, but WordPress has its own unique twist on it and don’t use the variant syntax. Instead they add a third component to the filename but not -x-informal either: de_DE.mo is the informal (and also fallback, because it lacks any further specification) variant in WordPress and de_DE_formal.mo contains the formal variant.

Václav Slavík
  • 6,445
  • 2
  • 28
  • 25
2

Language tags as defined in BCP 47 (currently RFC 5646) do not specify any codes for informal vs. formal variants of German. It would probably be unrealistic to try to have such codes registered, so you would be limited to Private Use subtags, e.g. de-x-formal vs. de-x-informal. Whether your software can handle these in any way is a different issue.

On the practical side. the choice of “Sie” vs. “Du” (or “du”) is hardly a language variant issue. Standard German uses both pronouns to address a person in singular, depending on style of presentation and on the relationship with the addressed person. At the extreme, we could say that the choice of “Sie” vs. “Du” in the context of addressing a user generically in instructions or a user interface is a language variant issue. But on the practical side, just make up your mind.

Community
  • 1
  • 1
Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390
  • I'll go with `de_DE-x-informal` then. – nachtigall Feb 05 '15 at 10:15
  • "But on the practical side, just make up your mind." It seems to be the "standard" approach, but not aways possible. My specific case is for a multi-tenancy app, each tenant can chose how they want to address their users (as it concerns their brand voice and other marketing considerations). I'll look into private-use subtags, thanks for your input! – rafasoares Apr 04 '22 at 10:19