如果您使用标准 Firebase 电子邮件服务,您目前可以接收多语言电子邮件only如果您使用 Firebase 提供的标准模板。如果您有自定义模板,可以在控制台中重置它。要发送特定于区域设置的邮件,您应该手动调用该函数以使用设备语言或使用字符串进行设置。以下示例提供了这些场景:
Web SDK https://firebase.google.com/docs/auth/web/manage-users#send_a_user_a_verification_email:
firebase.auth().useDeviceLanguage(); // set with function
firebase.auth().languageCode = 'fr'; // set with string
安卓软件开发工具包 https://firebase.google.com/docs/auth/android/manage-users#send_a_user_a_verification_email:
auth.useAppLanguage(); // set with function
auth.setLanguageCode("fr"); // set with string
斯威夫特软件开发工具包 https://firebase.google.com/docs/auth/ios/manage-users#send_a_user_a_verification_email:
Auth.auth().useAppLanguage(); // set with function
Auth.auth().languageCode = "fr"; // set with string
The Google 网上论坛邮件列表 https://groups.google.com/forum/#!searchin/firebase-talk/translate%7Csort:date/firebase-talk/WOa_MpxFETU/NVdY2IbdGAAJ对这些问题进行了很好的讨论。
另一个解决方案是使用自定义电子邮件操作处理程序。设置比较困难,但在Firebase 文档 https://firebase.google.com/docs/auth/custom-email-handler.