Enabling multilingual support in ShopMagic
ShopMagic 3.0 includes a powerful multilingual feature that allows you to create custom automations for different languages. This feature is built-in and can be enabled easily in the plugin settings in Modules section without the need for any additional plugins.
The main idea behind this feature is to create a default automation and child automations that are specific to each supported language (e.g. Spanish, French, German, etc.). The parent automation serves as a fallback option and is triggered when a customer's language is not supported by any of the child automations.
Creating multilingual automations
When creating a child automation, you will need to specify the language for which the automation is intended. You can select from a list of available languages. It is important to note that the language of the customer is determined by their browser settings, i.e. if your customer lives in Spain, but has set browser default language to English, they will be identified as an English user.
Once you've created the default automation and its child automations, you can view them all in the automation list. The child automations will be displayed as descendants of the default automation, and you can expand them by clicking on the arrow next to the checkbox on the left side of the automation list. From there, you can see the language and status (published or draft) of each automation.
Automations can be independent of each other, meaning that your default automation may be set as draft, while your specific language automations will be published -- such setting will result in triggering workflow if customer language matches child automation but not executing automation fallback for other customers. This may be useful if you only want to send your automation to customers of specific languages.
Persisting customers preferred language
Multilingual module enables your store to track your customers' language of preference with ease to send them localized content. You don't have to take any actions - the moment you activate the plugin, your website starts to collect users preferences.
Our plugin picks a list of languages, which user communicates in day-to-day by getting browser's preferences. Thanks to that, your customer will always receive email in language that she/he speaks. If your site doesn't support the user's preferred language, she/he will find a message in your site's default language in a mailbox.
To ensure that the multilingual feature works correctly, it's important to have session tracking enabled in the plugin settings. This allows ShopMagic to correctly detect the customer's language and trigger the appropriate automation. Without this, your customers may end up with default automation.
What does it mean - you get users' browser preferences?
Each browser, while communicating with one's website, sends a bunch of helpful information, like the language you prefer. You can check your browser's settings to see what languages you have selected as preferred. From this list, our plugin tries to match the best language from user's preferences and your site translations, starting from the most preferred language (top of the list in browser's preference). We save that match into user's record for automations processing.
How to test messages in multiple languages?
This may seem tricky at first. As preference mechanism is based on browser's setting, you can't easily trigger automations' flow in different languages from WordPress area (though you can always rely on Send test message). Usually, it's a good behavior - you don't want your users to change languages back and forth, triggering various automations not localized to the preferred language. Yet, when it comes to testing the validity of your automations' setup, it may be troubling.
The easiest way of verifying your automations in different languages would be to temporarily change the browser's preferred language. In Chrome, you can do that in Language settings tab, hidden behind Advanced settings; in Firefox, this setting is contained in General tab. After making that change, you need to visit your site again, to sort of confirm the change - preferred language is saved during your visit. That's an important detail, especially if you would like to test, i.e. delayed automation which is already queued, but not yet triggered - if you won't visit your store after making a change in browser, the last saved language will apply for the automation.