I appreciate the time you took to report this. This is a gap I knew existed, but I wasn't sure if it would be an issue for my users. Let me explain the situation and you will quickly understand my conundrum and why I decided to wait before implementing a different solution.
Emails sent by Admin Tools use Joomla's Mail Templates feature. We only ship the mail templates in English.
I believe what happens is the following. Your site is multilingual. It has German and French set up. That would mesh well with a Swiss company. When there's a blocked request the site is displaying in one of these languages, let's say German. Admin Tools request a mail template in German. One does not exist. Admin Tools looks for a default mail template content provided as a Joomla language string. This has been the default fallback ever since we had a mail template feature in Admin Tools.
Before 7.9.0 the only translation we provided was English (Great Britain) en-GB. Therefore, the English mail template was used.
Since 7.9.0 we ship translations in several languages: German, French, Spanish, Italian, Portuguese, and Greek. Since Admin Tools tries to fall back to a translated language you get a translated email.
Here's the thing. Neither the way it works, nor the way you expect it to work, not even anything else I do is the "right" way to do it.
There is no way in Joomla to communicate that certain email must be pinned to a specific language unless you tie them to a specific user. Language preferences are per user, not per email address. If I were to follow Joomla standards, I would have to restrict you into using email addresses which correspond to Joomla users. However, most web agencies want to receive Admin Tools' emails on their own aggregator address which does not correspond to a Joomla user.
If I were to tie the email to a specific, arbitrary language – with an option for you to change it – it would still be wrong in case of a multilingual site management team. I know of use cases where the site's administrators are German but there's a French consultant and an English site integrator. None of their languages would work for everyone; each one would want email in their own language.
I am thinking about implementing the following rules:
- If the email address corresponds to a Joomla user account we will use the language preference of that user account with a fallback to English (en-GB).
- If the email address DOES NOT correspond to a Joomla user account we will use the "Preferred fallback language for email notifications"; that's a new option I will be introducing. If none is provided, we will fall back to English (en-GB).
- In either case, if a Joomla Mail Template does not exist for both the preferred and the fallback language, we will use the Joomla translation system to get an email in whatever language the site is currently displayed in knowing full well this is not the expected language. We will expect this to generate a support request so we can tell people what to do – basically, follow the documentation of the two rules outlined above.
I think this is the only sensible way.
So, come next release, you will set the "Preferred fallback language for email notifications" to English, and your email addresses will either NOT correspond to a Joomla user account OR correspond to a Joomla user account whose preferred language is English. Therefore, your email will be pinned to English.
Does that sound good?
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!