How to translate emails?

Since the version 4.7, WordPress introduced the function switch_to_locale(). This function unloads all translations in the previous locale and loads the translations of WordPress in the new locale passed as argument. WordPress uses this function to send emails in the user language, for example the new user notification email. Once the email is sent, the previous locale is restored with restore_previous_locale().

It’s however important to know that these functions don’t load the theme or plugins translations. This is why the plugins and themes need to load their own translations with load_plugin_textdomain() or load_theme_textdomain(). This should be done just after the call to switch_to_locale(). Alternatively it’s possible to hook to the action change_locale fired each time switch_to_locale() and restore_previous_locale().

Step 1: Get the locale the email must be sent – possibly with get_user_locale(). which returns the locale set in the user profile.
Step 2: Call switch_to_locale() .
Step 3: Call load_plugin_textdomain to load your plugin’s translations if you did not hook to change_locale.
Step 4: Construct and send the email, using usual internationalization functions such as __().
Step 5: Call restore_previous_locale()
Step 6: Call load_plugin_textdomain to load your plugin’s translations if you did not hook to change_locale.

See also the post about locale switching on Make WordPress Core.