render, in email dev, and with any i18n library your app
already uses to pick the messages.
This guide shows how to convert an English Vuemail template to support multiple locales.
Prerequisites
To get the most out of this guide, you’ll need to: This guide will use the same email template as a base as the vue-i18n guide.Passing messages as props
1. Create messages for each locale
For each locale, create a new JSON file containing the content of the email in that locale.2. Update the email props
Add amessages prop to the email template, with a type for its messages, and use the English
messages for the preview. defineOptions can reference imports, so the preview uses the same file:
emails/welcome.vue
3. Update the email template
In the email template, remove the hardcoded content and render the messages instead.emails/welcome.vue