Cognito用户池是否支持国际化? [英] Will Cognito User Pools support internationalization?

查看:76
本文介绍了Cognito用户池是否支持国际化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们对新的Cognito用户池感到非常兴奋。但是看起来好像无法在消息中支持多种语言。

We are very excited about the new Cognito User Pools. But it looks like that there is no way to support multiple languages in messages.

例如,来自德国的用户应以德语获得验证消息,而来自新西兰的用户

For example a User from Germany should get a verification message in German while a user from New Zealand should get it in English.

没有国际化,没有人可以在英语国家/地区之外使用Cognito用户池。

Without internationalization nobody could use Cognito User Pools outside of English speaking countries.

推荐答案

您可以使用 Lambda触发器功能Cognito用户池可自定义发送给用户的消息。

You can use the Lambda Triggers functionality with Cognito User pools to customize the messages that are sent to your users.

自定义消息Lambda触发器会向您发送一个事件源,该事件源可帮助您识别特定的用户池或用户然后向服务返回一个消息模板,该模板将在发送SMS或电子邮件消息时使用。它应符合包含{####}作为代码参数的合同。

The Custom Message Lambda Trigger sends you an event source which can help you identify a particular user pool or user and then return the service a message template which will be used when sending SMS or Email message. It should conform to the contract of including {####} as code parameter.

在您的特定情况下,要识别来自特定国家/地区的用户,您可以创建<用户池中的href = http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-settings.html rel = noreferrer>自定义属性用于来源国家。在每个SignUp调用中,您可以设置该值,然后服务会将其发送到lambda函数。

In you specific case, to identify users from a particular country you can create a Custom Attribute in your user pool for source country. In each SignUp call you can set that value and the service will send that value to your lambda function.

这篇关于Cognito用户池是否支持国际化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆