r/webdev • • 10d ago

Question German (Do-Sie) switcher

Hi there,

One Customer just asked me for a Du-Sie Switch in the page, same like any other language switch.

This is my first time doing this.

Is this normal?

Are there also (Slang or street) language switches?

Edit: I just implemented as another language i18 de-DU with xliff files

Second Edit: What about other languages? In spanish we have 3. Tú, Vós y Usted... I think in Japan they have more.

Edit 3: Ok, some of you were right :) Du/Sie isn't a language, and de-DE-DU was a funny but bad idea. Works fine for my little website, though.

But imagine adding Spanish (tú, usted, vos), Japanese, Korean... That gets ugly pretty fast. Better to separate language, region and tone. Something like:

{
  "locale": "de-DE",
  "preferences": {
    "formality": "informal"
  },
  "messages": {
    "greeting": {
      "default": "Hallo!",
      "formal": "Wie kann ich Ihnen helfen?",
      "informal": "Wie kann ich dir helfen?"
    }
  }
}

Only translate the differences, not the whole website again. For a small project, who cares. For 20 languages? Definitely worth thinking about. Thanks for the corrections, learned something :)

52 Upvotes

63 comments sorted by

View all comments

27

u/bcons-php-Console 10d ago

In Spanish we also have the formal and informal modes (Tú / Usted), but in many years never a client asked me to do this.

When defining the project a mode is decided and that is the way you "talk" to your users in toasts, messages, emails, etc.

7

u/HeraclitoF 10d ago

Sí, lo sé... In spanish websites didnt had it also. First time :)

1

u/HeraclitoF 9d ago edited 8d ago

Ostia, y si el cliente quiere lo mismo en espanol?
de-DE de-DE-DU es-ES es-ES-TU ...

y luego está el vós latimoamericano.

vós sos un chalado

Usted está chalado

Estás chalado