{"action":"created","issue":{"url":"https://api.github.com/repos/AD7six/cakephp-shadow-translate/issues/23","labels_url":"https://api.github.com/repos/AD7six/cakephp-shadow-translate/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/AD7six/cakephp-shadow-translate/issues/23/comments","events_url":"https://api.github.com/repos/AD7six/cakephp-shadow-translate/issues/23/events","html_url":"https://github.com/AD7six/cakephp-shadow-translate/issues/23","id":115030140,"number":23,"title":"default language missing when querying \"translations\"","user":{"login":"danielzzz","id":351916,"avatar_url":"https://avatars.githubusercontent.com/u/351916?v=3","gravatar_id":"","url":"https://api.github.com/users/danielzzz","html_url":"https://github.com/danielzzz","followers_url":"https://api.github.com/users/danielzzz/followers","following_url":"https://api.github.com/users/danielzzz/following{/other_user}","gists_url":"https://api.github.com/users/danielzzz/gists{/gist_id}","starred_url":"https://api.github.com/users/danielzzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielzzz/subscriptions","organizations_url":"https://api.github.com/users/danielzzz/orgs","repos_url":"https://api.github.com/users/danielzzz/repos","events_url":"https://api.github.com/users/danielzzz/events{/privacy}","received_events_url":"https://api.github.com/users/danielzzz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-04T11:12:51Z","updated_at":"2015-11-04T14:25:46Z","closed_at":null,"body":"hi, I am not sure if it's a bug or I am doing something wrong. \r\n\r\nI have two languages in my app es_ES and es_CA, where the first one is set as default.\r\n\r\nI configure I18n::locale('es_ES') and then I can receive both languages using find('translations')\r\nthen $entity->field - contains the original (es_ES) content and \r\n$entity->_translations['es_CA']->field has the catalan translation (good!)\r\n\r\nbut when I change locale globally to 'es_CA' using I18n::locale('es_CA') then both\r\n$entity->field and $entity->_translations['es_CA']->field have the same value (which is ok, because we expect catalan to be the primary content), but es_ES which is in the base table is not received at all.\r\n\r\nI expected these values from the base table to appear in _translations['es_ES'] after they are being overwritten when getting the translated content\r\n\r\nthanks, best, dan"},"comment":{"url":"https://api.github.com/repos/AD7six/cakephp-shadow-translate/issues/comments/153740328","html_url":"https://github.com/AD7six/cakephp-shadow-translate/issues/23#issuecomment-153740328","issue_url":"https://api.github.com/repos/AD7six/cakephp-shadow-translate/issues/23","id":153740328,"user":{"login":"danielzzz","id":351916,"avatar_url":"https://avatars.githubusercontent.com/u/351916?v=3","gravatar_id":"","url":"https://api.github.com/users/danielzzz","html_url":"https://github.com/danielzzz","followers_url":"https://api.github.com/users/danielzzz/followers","following_url":"https://api.github.com/users/danielzzz/following{/other_user}","gists_url":"https://api.github.com/users/danielzzz/gists{/gist_id}","starred_url":"https://api.github.com/users/danielzzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielzzz/subscriptions","organizations_url":"https://api.github.com/users/danielzzz/orgs","repos_url":"https://api.github.com/users/danielzzz/repos","events_url":"https://api.github.com/users/danielzzz/events{/privacy}","received_events_url":"https://api.github.com/users/danielzzz/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T14:25:46Z","updated_at":"2015-11-04T14:25:46Z","body":"no, the default lang stays the same. \r\nI have two areas - admin and public.\r\nThe first shows all languages (for edition) the second just the active one.\r\nI manage the change of the active one using \"I18n::locale('xx_YY');\r\nthis way on the public site I can use entities as if they had just one language ($entity->field)\r\n\r\nwithin the admin panel I receive all languages and create fields for edition, so the admin can edit them all at once. it works fine but only if the default language is not changed. in that case I have the problem described above.\r\nright now I solved it hard setting the locale to spanish in the control panel, but I wasn't sure if the situation I reported is how you envisioned it to work.\r\n\r\nthe bottom line is if it's possible to retrieve the spanish (default) content having the locale set to another one."}}