For a current project, I’ve been struggling with my language files. They’re all JSON files, and will always fallback to English if translations aren’t available.

My problem is that when a new key is required, I use my english file by default. This leads to situations where my client wants to translate new keys to other languages, and I have to spend time looking at all files, figuring out which keys i haven’t added there.

Essentially I want to get to a point where I can give all the translation files to my client, and he returns them with the translated content.

What do you guys use for managing this? And how would you solve the situation i’ve found myself in.

  • 🅿🅸🆇🅴🅻@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    We return / display the translation key name if no translation is available for that language, including for the default (English).

    Also, on dev / test environments we can enable a config (.env) setting to append the text " [UNTRANSLATED]" to every value that doesn’t have a translation, as they’re easier to spot in the website / interface.

    I’m talking about a PHP /Laravel project so it was easy to override the default translation engine behaviour.

    • BetaSalmon@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I suppose my main issue is with the actual language files. In terms of translation we also default to English. It’s just a tedious job to remember to add they new key to every language file, which is a problem I’m facing now.

      Due to so many new features, the non-English language files are quite outdated.