Best way to make configuration persistent


  • Used Zammad version: 2.4
  • Used Zammad installation source: deb package
  • Operating system: Ubuntu 16.04

Problem description:

My browser is set to prefer the Dutch locale. It sends Accept-Language: nl-NL,nl;q=0.9,en-NL;q=0.8,en;q=0.7,en-US;q=0.6,de;q=0.5

I don’t like the Dutch translation of Zammad, and it’s incomplete. Of course I can also opt to choose to complete the translation but at this point I’d just like to use the English locale and the English locale only.
@martini taught me this trick to delete all locales but the English one:

zammad run rails r "Locale.where.not(locale: 'en-us').delete_all"

Expected behavior:

  • If I run the command above, all locales except en_us should be deleted and I will only ever see this locale.

Actual behavior:

  • This works somewhat, because if I do this and then log in to the Web UI, I see the UI is in English. But transactional email still is in Dutch. And when I come back a couple of days later, all locales are back again and I have to run the rails command above again to make sure my changes are persistent. I understand the problem is probably just me misunderstanding Zammad and/or Rails; what is the best way to make this change persistent?

Steps to reproduce the behavior:

  • Run Rails command. Go to web UI. Wait a couple of days, the other locales are back. :frowning:

Hi @mwb

thanks for this topic. Now I can understand what you mean.

  1. Re-creation of locals
    On every Zammad update a sync of all locals an translations is done. So in your case you need to execute zammad run rails r "Locale.where.not(locale: 'en-us').delete_all" after every Zammad update (sorry - I never had his use case in mind).

  2. Localiced emails
    After every Zammad update you need to remove all localised email templates under app/views/*/*/*.erb. Just remove all but not with /en.*



Is there a hook or event ‘after-update’ or ‘after-server-start’ or something like that were I can hook scripts in which run after installation or after starting the rails server?

And also, I understand you might not want to have something like a sysconfig with 1000s of settings in Zammad. And I think it’s very nice to have a system that more or less does the right thing without configuring it to no end. But would you think it’s reasonable to add a configuration setting to Zammad where the admin can limit available locales for the frontends? Would you be open to such a PR?

For OTRS, I’ve oftentimes configured the sysconfig for customers to only make Dutch available, or only German, or English + German, but not all 30+ languages, to make the experience smooth for users. I think a feature like this would be helpful.

Ping! Can anyone provide feedback?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.