Cognito用户池是否支持国际化?(Will Cognito User Pools support internationalization?)
我们对新的Cognito用户池感到非常兴奋。 但看起来没有办法在消息中支持多种语言。
例如,来自德国的用户应该使用德语获取验证消息,而来自新西兰的用户应该使用英语获取。
没有国际化,没有人可以在英语国家之外使用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.
Without internationalization nobody could use Cognito User Pools outside of English speaking countries.
Will this be a feature in the final release on Cognito User Pools?
原文:https://stackoverflow.com/questions/36779257
最满意答案
在你的成功回调中你可以使用$ resource response的
toJSON()
函数,这样你就可以得到你想要的普通对象......var getUserLimits = function() { usersService.getLimits({ userId: userId }).$promise.then(function(data) { console.log(data.toJSON()); }); };
on your success callback you can use
toJSON()
function of $resource response so you will get plain object as you wanted...var getUserLimits = function() { usersService.getLimits({ userId: userId }).$promise.then(function(data) { console.log(data.toJSON()); }); };
相关问答
更多-
解决Angular资源承诺(Resolve Angular resource promise)[2022-07-12]
在你的成功回调中你可以使用$ resource response的toJSON()函数,这样你就可以得到你想要的普通对象...... var getUserLimits = function() { usersService.getLimits({ userId: userId }).$promise.then(function(data) { console.log(data.toJSON()); }); }; on your success callback you can ... -
然后Angular 2承诺(Angular 2 then promise)[2023-12-23]
您可能需要考虑使用胖箭头符号来避免范围冲突。 在您的情况下, 这不是指向类实例,而是指向您的承诺的sucesscallback。 getHeroes() { let instance : HeroesComponent = this; this.heroService.getHeroes().then((value) => { //SUCCESS console.log(value); this.heroes = value; ... -
你需要使用$ q.all。 所以你的_.each将填充一个promises数组,你将调用$ q.all(thatArray)。 $ q.all(thatArray)中的函数将获得所有这些调用的结果数组,然后您可以执行then()来执行最终调用。 https://www.jonathanfielding.com/combining-promises-angular/ You need to use $q.all. So your _.each will populate a promises array, a ...
-
Angular无法解决承诺(Angular cannot resolve promise)[2023-05-27]
尝试这个 : app.factory("dataService", [ "$http", "$timeout", function ($http) { function post(url, data) { return new Promise(function(resolve, reject) { $http.post(url, data) ... -
如文档中所列,资源立即返回一个值(空对象或空数组),然后提取数据并稍后分配它。 https://docs.angularjs.org/api/ngResource/service/$resource 认识到调用$ resource对象方法立即返回一个空引用(依赖于isArray的对象或数组)是很重要的。 一旦从服务器返回数据,现有参考将填入实际数据。 这是一个有用的技巧,因为通常资源被分配给一个模型,然后由该模型渲染。 当直接在控制器内部使用时,此功能正常工作,但不适用于路由器的解决方案,因为对于路由器库, ...
-
对承诺使用alert不起作用,即它不会在承诺中显示结果。 但是,angular被设计为直接使用$resource服务绑定到作用域。 这意味着您可以将$resource结果绑定到作用域对象,并且angular将考虑到应用绑定时作用域对象是承诺。 这就是为什么alert(resourceResult)不起作用的原因,但$scope.myObj = resourceResult; (然后将它绑定在一个视图中),将起作用。 插入代码片段更清楚地解释事情: var app = angular.module('myap ...
-
问题是这个问题的范围,它更好地使用$ scope甚至更好的别名如vmSomething = this; 避免这种问题。 试试这个例子。 国家配置阶段 $stateProvider. state('yourstate',{ url:'yoururl', controller:'cmsProductsController', controllerAs:'vm', templateUrl:'yourhtmlroute' }); 控制器避免使用它。 尝试更好地使用controllerAs angular. ...
-
如果你想真正使用你可以做的promise : category.get(...) .$promise.then(function(result)) { console.log(result); }); 否则,你没有使用承诺。 If you want to actually use the promise you can do: category.get(...) .$promise.then(function(result)) { console.log(result); ...
-
可能是这个吸血鬼可以帮助你。 使用以下代码 for(var org in $scope.orgData){ //for loop will return the key of the $scope.orgData and that will be the array index if(!isNaN(org)){ //to ignore the $promise and $resolve objects from the data console.log($scope.orgData[org ...
-
未解决的承诺角度(Unresolved promise angular)[2021-08-18]
你需要获得$promise并传递回调,如下所示: Item.item_count().$promise.then(function(data) { $scope.totalItems = data.total; }); 如果您需要在加载视图之前解析数据,可以使用$ stateProvider来解决它。 这应该可以让您了解使用它的方式和使用方法: http : //www.codelord.net/2015/06/02/angularjs-pitfalls-using-ui-routers-resolv ...