How can I change the default language for lists (and other defaults)? I changed it in mailman-core but Postorius overrides these core defaults with a patch.
I am using the docker version of maxking
Wessel
Wessel Kraaij writes:
How can I change the default language for lists (and other defaults)? I changed it in mailman-core but Postorius overrides these core defaults with a patch.
You need to be more specific about what you did, what you expect to happen in various cases, and what you mean by "patch".
Specifically, what language do you want as default, how did you spell it in mailman.cfg, have you checked that there are no list-specific settings (that override the default), is the problem in distributed posts, in Mailman-generated notifications, or in web pages? Specifically which part of posts, notifications, or web pages have unexpected languages? What language are they supposed to be, and what language(s) do you see?
For context, here is how language setting works:
In mailman.cfg (usually located at /etc/mailman3/mailman.cfg), there
is a default_language variable in the [mailman] section (hardcoded
to "en" if not overridden). This can be overridden on a per-list
basis, usually configured using Postorius. Postorius has read-only
access to the default_language setting, I believe, but I am not aware
of any way for Postorius to set it.
The settings in Mailman core directly control which language's templates and gettext substitutions are used in emails generated by Mailman and in footers and the like added to posts distributed by Mailman. In any given context, for each substitution, the list's language is checked for a translation, then the site's default language, then English is the fallback. You can end up with mixed languages if some contexts have not been translated.
Postorius and HyperKitty both use their own templates which are
separately provided in those packages. As far as I know they do not
have a default language setting of their own (although the Django
framework probably does, we don't use that). Instead, through the
mailmanclient library they read the current list's preferences (and
Postorius can change the list preference but not the site default),
and fetch templates and variable substitutions in the same way. It is
quite possible that the language you specified is missing the
translations you're looking for, or that the language code you
specified is not one that Mailman recognizes.
I am using the docker version of maxking
I don't think that matters, but Abhilash (maxking) is the only real expert on docker-mailman, and he's not following this list closely at this time. Check the docker-mailman documentation for the preferred method of communicating with him if it seems to be relevant.
Regards, Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Hi, thanks for your response. I realize my question was underspecified.
What happened: I changed several defaults in mailman core (e.g. preferred language). However, Postorius (maxking version) initializes the defaults for new lists and overrides the core defaults using a PATCH call on the REST API.
With the aid of some gentle AI chatbot, I was able to fix the problem in Postorius, by patching the list.py file to read and apply defauls from the config file (in maxking's version that is setting_local.py).
I am talking about Dutch. Here is the code snippet that solved my issue
from django.conf import settings as django_settings for key, value in getattr(django_settings, 'DEFAULT_LIST_SETTINGS', {}).items(): list_settings[key] = value list_settings.save()
(added in list_new)
I added the following 'defaults' in my settings file: DEFAULT_LIST_SETTINGS = { 'preferred_language': 'nl', 'subscription_policy': 'confirm', 'default_member_action': 'defer', 'default_nonmember_action': 'hold', 'reply_goes_to_list': 'point_to_list', 'reply_to_address': '', 'max_message_size': 10240, 'anonymous_list': False, 'dmarc_mitigate_action': 'munge_from', 'collapse_alternatives': False, 'dmarc_mitigate_unconditionally': True, }
This way each new list is properly initiated.
Best regards,
Wessel
-----Oorspronkelijk bericht----- Van: Stephen J. Turnbull <steve@turnbull.jp> Verzonden: zaterdag 11 april 2026 19:25 Aan: Wessel Kraaij <wessel.kraaij@outlook.com> CC: mailman-users@mailman3.org Onderwerp: [MM3-users] Changing default language for lists
Wessel Kraaij writes:
How can I change the default language for lists (and other > defaults)? I changed it in mailman-core but Postorius overrides > these core defaults with a patch.
You need to be more specific about what you did, what you expect to happen in various cases, and what you mean by "patch".
Specifically, what language do you want as default, how did you spell it in mailman.cfg, have you checked that there are no list-specific settings (that override the default), is the problem in distributed posts, in Mailman- generated notifications, or in web pages? Specifically which part of posts, notifications, or web pages have unexpected languages? What language are they supposed to be, and what language(s) do you see?
For context, here is how language setting works:
In mailman.cfg (usually located at /etc/mailman3/mailman.cfg), there is a
default_languagevariable in the [mailman] section (hardcoded to "en" if not overridden). This can be overridden on a per-list basis, usually configured using Postorius. Postorius has read-only access to the default_language setting, I believe, but I am not aware of any way for Postorius to set it.The settings in Mailman core directly control which language's templates and gettext substitutions are used in emails generated by Mailman and in footers and the like added to posts distributed by Mailman. In any given context, for each substitution, the list's language is checked for a translation, then the site's default language, then English is the fallback. You can end up with mixed languages if some contexts have not been translated.
Postorius and HyperKitty both use their own templates which are separately provided in those packages. As far as I know they do not have a default language setting of their own (although the Django framework probably does, we don't use that). Instead, through the
mailmanclientlibrary they read the current list's preferences (and Postorius can change the list preference but not the site default), and fetch templates and variable substitutions in the same way. It is quite possible that the language you specified is missing the translations you're looking for, or that the language code you specified is not one that Mailman recognizes.I am using the docker version of maxking
I don't think that matters, but Abhilash (maxking) is the only real expert on docker-mailman, and he's not following this list closely at this time. Check the docker-mailman documentation for the preferred method of communicating with him if it seems to be relevant.
Regards, Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww w.siriusopensource.com%2F&data=05%7C02%7C%7Ca86b6a6a504d4285dc 8508de97ef499c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6 39115251139974756%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjo yfQ%3D%3D%7C0%7C%7C%7C&sdata=EBR2PY36Mm5nldbPpSwT%2FgEuIe CnuD6JqHUhGEE6GEM%3D&reserved=0 Software systems consulting in Europe, North America, and Japan
participants (2)
-
Stephen J. Turnbull -
Wessel Kraaij