Any templates introduced before this feature was released will retain their behavior. However, you can easily update them to use the new localized format used by new email templates.
Requirements
This is an advanced tutorial. Please make sure that all requirements have been met, or you will not be able to complete this tutorial.- For an introduction to email templates, refer to the Using Email Templates to Send an Account Recovery Email tutorial.
- Please review the information on how to work with default languages on your title, and the preferred languages for your players in the Setting Default Languages tutorial. You must have a title default language set to continue with localized email templates.
Updating an existing email template
The first thing we will do is update the existing account recovery email template we made in the Using Email Templates to Send an Account Recovery Email tutorial mentioned above.- Select Content from the menu on the left.
- Go to the Email Templates tab.
- Move to the Template name field, and select the Account Recovery template.



Sending localized emails
Next, we will send our new localized version of the email. As was mentioned in the Setting Default Languages tutorial, PlayFab does the heavy lifting to match your title’s supported languages with your players’ preferred language. All you need to do is tell us to send the email. To verify this behavior, create two test players. Leave one of the new players without a preferred language. This will demonstrate how PlayFab falls back to the title’s default if there is no language specified or if there is no match between the title’s language and the player’s language. Set the other new player’s language by using Game Manager, or by using the SetProfileLanguage API. We have used French in this example.When using the
SetProfileLanguage API, the language string must be specified in the ISO 639-1 format (for example, “en”, “es”, or “ja”). At the current time, the code “zh” is not supported.- Once in French to the player whose preferred language is French.
- Once in the default language to a player with no preferred language set.


