Mautic Community Forums

SMS and Push Notifications translations: automatically choose language in campaign

Mautic has a convenient feature with emails which allows you to create a single email, and then add many translated versions of that email. And then within a campaign you can choose to send that master email. The campaign will select the appropriate translated version for each user based on their locale.

I installed the Twilio and OneSignal plugins and see that you can pre-create messages (like with email). And you can assign them a language (like with email). But there does not appear to be a feature for associating translated versions with a master message. Which means that in the campaign builder I might have to add a condition branch for each locale when I want to send an SMS or push. So if I have 7 languages and want to send a single SMS, I’d have to add 7 conditions…one for each locale.

My question is this: is there a better way that I’m missing? I will consider coding a better way if I need to.


Hi, you can use the campaign decision tree for this:

Language preference can be checked as:


Joeyk - thanks for the reply! Is that tree more efficient than flattening it out like this in the image below?

So what happens if the language is Italian?

I think what you’re asking is how to handle a default. So if there is an unsupported locale, how do we catch it. If possible, we could add one more condition check which uses a regex to check if the locale appears in a string of concatenated locales. Would have to test of course. But if ‘yes’, do nothing, if ‘no’, then we default to English or whatever the default should be.

The concatenated string could be something like en|de|fr.

Even this I’m not in love with though. I’ll probably at least look into improving this through code.

What I was saying is, that in my version English is the default, fallback language.
In yours there was no fall back language.