{"action":"created","issue":{"url":"https://api.github.com/repos/grosser/fast_gettext/issues/74","labels_url":"https://api.github.com/repos/grosser/fast_gettext/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/grosser/fast_gettext/issues/74/comments","events_url":"https://api.github.com/repos/grosser/fast_gettext/issues/74/events","html_url":"https://github.com/grosser/fast_gettext/issues/74","id":56913717,"number":74,"title":"Question: how fallback translation from pt_BR to pt?","user":{"login":"brauliobo","id":41740,"avatar_url":"https://avatars.githubusercontent.com/u/41740?v=3","gravatar_id":"","url":"https://api.github.com/users/brauliobo","html_url":"https://github.com/brauliobo","followers_url":"https://api.github.com/users/brauliobo/followers","following_url":"https://api.github.com/users/brauliobo/following{/other_user}","gists_url":"https://api.github.com/users/brauliobo/gists{/gist_id}","starred_url":"https://api.github.com/users/brauliobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brauliobo/subscriptions","organizations_url":"https://api.github.com/users/brauliobo/orgs","repos_url":"https://api.github.com/users/brauliobo/repos","events_url":"https://api.github.com/users/brauliobo/events{/privacy}","received_events_url":"https://api.github.com/users/brauliobo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-07T14:55:59Z","updated_at":"2015-02-07T16:13:59Z","closed_at":"2015-02-07T15:34:36Z","body":"(Sorry to use the issue tracker to ask something. I really couldn't figure out how to do this)\r\n\r\nI need to support country specific languages, for example, `pt_BR`, `en_US`, etc. But if the translation is not found, then it should lookup on a general language translation (e.g. `pt`, `en`).\r\n\r\nHow can I achieve that? I've tried to do with chains but couldn't...\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/grosser/fast_gettext/issues/comments/73370367","html_url":"https://github.com/grosser/fast_gettext/issues/74#issuecomment-73370367","issue_url":"https://api.github.com/repos/grosser/fast_gettext/issues/74","id":73370367,"user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T16:13:59Z","updated_at":"2015-02-07T16:13:59Z","body":"I think the simpler / faster way is generating the fallbacks into the\ntranslations.\nIf you use yml/json that should be straight forward, for po/mo you can use\nhttps://github.com/grosser/get_pomo to read/write them.\nBasically read pt_BR and check which keys are in pt/en but not in there ->\nfill them out.\n\nOn Sat, Feb 7, 2015 at 7:54 AM, Bráulio Bhavamitra <notifications@github.com\n> wrote:\n\n> @grosser <https://github.com/grosser> what do you think if I implement\n> something similar to\n> https://github.com/svenfuchs/i18n/blob/master/lib/i18n/backend/fallbacks.rb\n> on fastgettext?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/grosser/fast_gettext/issues/74#issuecomment-73369621>.\n>\n"}}