{"action":"created","issue":{"url":"https://api.github.com/repos/angular-translate/angular-translate/issues/132","labels_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/132/comments","events_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/132/events","html_url":"https://github.com/angular-translate/angular-translate/issues/132","id":17945263,"number":132,"title":"Variable replacement inside loops","user":{"login":"Danita","id":754783,"avatar_url":"https://avatars.githubusercontent.com/u/754783?v=3","gravatar_id":"","url":"https://api.github.com/users/Danita","html_url":"https://github.com/Danita","followers_url":"https://api.github.com/users/Danita/followers","following_url":"https://api.github.com/users/Danita/following{/other_user}","gists_url":"https://api.github.com/users/Danita/gists{/gist_id}","starred_url":"https://api.github.com/users/Danita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Danita/subscriptions","organizations_url":"https://api.github.com/users/Danita/orgs","repos_url":"https://api.github.com/users/Danita/repos","events_url":"https://api.github.com/users/Danita/events{/privacy}","received_events_url":"https://api.github.com/users/Danita/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-translate/angular-translate/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2013-08-12T15:01:32Z","updated_at":"2015-04-22T20:26:57Z","closed_at":"2013-08-23T14:58:10Z","body":"Hi!\r\n\r\nI couldn't solve the following use case. What do I have to do when I have to replace a variable in a translation string inside a loop like `ng-repeat`?\r\n\r\nFor example, given the following:\r\n\r\nController:\r\n```javascript\r\n$scope.messages = [\r\n\t{ author: \"John\", body: \"Lorem ipsum\" },\r\n\t{ author: \"Peter\", body: \"Lorem ipsum\" },\r\n\t{ author: \"Nancy\", body: \"Lorem ipsum\" }\r\n]\r\n```\r\n\r\nTranslation:\r\n```javascript\r\n{\r\n\t\"REPLY_TO\" : \"Reply to {{user}}\"\r\n}\r\n```\r\n\r\nPartial:\r\n```html\r\n<ul>\r\n\t<li ng-repeat=\"message in messages\">\r\n\t\t<p>message.body</p>\r\n\t\t<a href=\"#\">{{ 'REPLY_TO' | translate:'{user : message.author}' }}</a>\r\n\t</li>\r\n</ul>\r\n```\r\n\r\nI think something like that is not possible without doing all in the controller, which I feels breaks the principle of separation of concerns."},"comment":{"url":"https://api.github.com/repos/angular-translate/angular-translate/issues/comments/95325645","html_url":"https://github.com/angular-translate/angular-translate/issues/132#issuecomment-95325645","issue_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/132","id":95325645,"user":{"login":"AqquaBug","id":12011014,"avatar_url":"https://avatars.githubusercontent.com/u/12011014?v=3","gravatar_id":"","url":"https://api.github.com/users/AqquaBug","html_url":"https://github.com/AqquaBug","followers_url":"https://api.github.com/users/AqquaBug/followers","following_url":"https://api.github.com/users/AqquaBug/following{/other_user}","gists_url":"https://api.github.com/users/AqquaBug/gists{/gist_id}","starred_url":"https://api.github.com/users/AqquaBug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AqquaBug/subscriptions","organizations_url":"https://api.github.com/users/AqquaBug/orgs","repos_url":"https://api.github.com/users/AqquaBug/repos","events_url":"https://api.github.com/users/AqquaBug/events{/privacy}","received_events_url":"https://api.github.com/users/AqquaBug/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T20:26:57Z","updated_at":"2015-04-22T20:26:57Z","body":"Hi,\r\n\r\nI am very new to angular-translate, so please forgive me if this is a very stupid question!\r\n\r\nNow on this example that SebC99 has provided : http://jsfiddle.net/UGLjh/\r\n\r\nall seems well, however i am in a situation where i need the body to be translated as well\r\n\r\n$scope.messages = [\r\n    { author: \"John\", body: \"Lorem ipsum\" },\r\n    { author: \"Peter\", body: \"Lorem ipsum\" },\r\n    { author: \"Nancy\", body: \"Lorem ipsum\" }\r\n]\r\n\r\nbody variable in the messages array is \"Lorem ipsum\" which is in Latin, what if i needed that to be translated as well.Is there a way to do that, imagine that $scope.messages array is actuall coming from a json file through $http service, and that data in that file is in english.Which has multiple nested arrays with english data.\r\n\r\nHow can i change that body data which is Lorem ipsum while i am translating \"REPLY_TO\" : \"Reply to {{user}}\".\r\n\r\nI hope you can help me.\r\n\r\nThank you in advance\r\n\r\n\r\n"}}