{"action":"created","issue":{"url":"https://api.github.com/repos/Abhoryo/APYDataGridBundle/issues/779","labels_url":"https://api.github.com/repos/Abhoryo/APYDataGridBundle/issues/779/labels{/name}","comments_url":"https://api.github.com/repos/Abhoryo/APYDataGridBundle/issues/779/comments","events_url":"https://api.github.com/repos/Abhoryo/APYDataGridBundle/issues/779/events","html_url":"https://github.com/Abhoryo/APYDataGridBundle/issues/779","id":119999187,"number":779,"title":"Translations to the Grid Content","user":{"login":"mrvelamuri","id":14015297,"avatar_url":"https://avatars.githubusercontent.com/u/14015297?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvelamuri","html_url":"https://github.com/mrvelamuri","followers_url":"https://api.github.com/users/mrvelamuri/followers","following_url":"https://api.github.com/users/mrvelamuri/following{/other_user}","gists_url":"https://api.github.com/users/mrvelamuri/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvelamuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvelamuri/subscriptions","organizations_url":"https://api.github.com/users/mrvelamuri/orgs","repos_url":"https://api.github.com/users/mrvelamuri/repos","events_url":"https://api.github.com/users/mrvelamuri/events{/privacy}","received_events_url":"https://api.github.com/users/mrvelamuri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T17:52:02Z","updated_at":"2015-12-09T22:37:41Z","closed_at":null,"body":"When translation is enabled, then by default the translation is getting applied to the titles in Grid By default. \r\nBut the content is not at all getting translated. I tried to find out a suitable solution for this but not found any answer in the internet. \r\nI have used this library across my site and now since this translation for content is not working, I have to change this with some other plugin. We tried to tweak it in our code, it worked but I don't wanted to tweak some core library. \r\nCurrent Issue, \r\n![translations](https://cloud.githubusercontent.com/assets/14015297/11539126/7870514a-994b-11e5-9c00-c1ffbe5e80e1.jpg)\r\n\r\n\r\nIn this file, apy/datagrid-bundle/Resources/views/blocks.html.twig, if we change line number 131 as below then it will work, <td class=\"grid-column-{{ column.renderBlockId }}{% if column.class %} {{ column.class }}{% endif %}{% if column.align != 'left'%} align-{{ column.align }}{% endif %}{% if loop.last %} last-column{% endif %}{% if last_row %} last-row{% endif %}\">{{ grid_cell(column, row, grid)|trans|raw }}</td>\r\n\r\nCan you please provide a quick solution for this, so that I need not to redo all my work to replace DataGrid with some other grid or custom grid?\r\n\r\n--\r\nThanks, \r\nLalith"},"comment":{"url":"https://api.github.com/repos/Abhoryo/APYDataGridBundle/issues/comments/163423396","html_url":"https://github.com/Abhoryo/APYDataGridBundle/issues/779#issuecomment-163423396","issue_url":"https://api.github.com/repos/Abhoryo/APYDataGridBundle/issues/779","id":163423396,"user":{"login":"qferr","id":7026161,"avatar_url":"https://avatars.githubusercontent.com/u/7026161?v=3","gravatar_id":"","url":"https://api.github.com/users/qferr","html_url":"https://github.com/qferr","followers_url":"https://api.github.com/users/qferr/followers","following_url":"https://api.github.com/users/qferr/following{/other_user}","gists_url":"https://api.github.com/users/qferr/gists{/gist_id}","starred_url":"https://api.github.com/users/qferr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qferr/subscriptions","organizations_url":"https://api.github.com/users/qferr/orgs","repos_url":"https://api.github.com/users/qferr/repos","events_url":"https://api.github.com/users/qferr/events{/privacy}","received_events_url":"https://api.github.com/users/qferr/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T22:37:40Z","updated_at":"2015-12-09T22:37:40Z","body":"Hello,\r\n\r\nYou have two solutions.\r\n\r\n#### Translatable Behavior\r\n\r\nFor the data translations, you can use the translatable behavior by [Gedmo](https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/translatable.md).\r\n\r\nDon't forget to hint the query :\r\n\r\n```\r\n$source->addHint(\r\n    Doctrine\\ORM\\Query::HINT_CUSTOM_OUTPUT_WALKER,\r\n    'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\r\n);\r\n```\r\n\r\n#### Manipulate column render cell\r\n\r\nYou can manipulate the render of the cell with the translator service:\r\n\r\n```\r\n$translator = $this->getTranslator();\r\n\r\n$column->manipulateRenderCell(function ($value) use ($translator) {\r\n    return $translator->trans($value);\r\n}); \r\n```\r\n\r\n**Warning**: the `$value` must exit in your message catalogs."}}