{"action":"created","issue":{"url":"https://api.github.com/repos/marcoscaceres/jsi18n/issues/13","repository_url":"https://api.github.com/repos/marcoscaceres/jsi18n","labels_url":"https://api.github.com/repos/marcoscaceres/jsi18n/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/marcoscaceres/jsi18n/issues/13/comments","events_url":"https://api.github.com/repos/marcoscaceres/jsi18n/issues/13/events","html_url":"https://github.com/marcoscaceres/jsi18n/issues/13","id":227750770,"number":13,"title":"currency: \"USD\"","user":{"login":"Sun3","id":4562374,"avatar_url":"https://avatars0.githubusercontent.com/u/4562374?v=3","gravatar_id":"","url":"https://api.github.com/users/Sun3","html_url":"https://github.com/Sun3","followers_url":"https://api.github.com/users/Sun3/followers","following_url":"https://api.github.com/users/Sun3/following{/other_user}","gists_url":"https://api.github.com/users/Sun3/gists{/gist_id}","starred_url":"https://api.github.com/users/Sun3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sun3/subscriptions","organizations_url":"https://api.github.com/users/Sun3/orgs","repos_url":"https://api.github.com/users/Sun3/repos","events_url":"https://api.github.com/users/Sun3/events{/privacy}","received_events_url":"https://api.github.com/users/Sun3/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-10T17:13:43Z","updated_at":"2017-05-15T00:52:55Z","closed_at":"2017-05-11T08:05:31Z","body":"Is there a way to query for the local currency code like 'USD' or 'EUR' depending on the user's locale instead of manually picking it?\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/marcoscaceres/jsi18n/issues/comments/301352476","html_url":"https://github.com/marcoscaceres/jsi18n/issues/13#issuecomment-301352476","issue_url":"https://api.github.com/repos/marcoscaceres/jsi18n/issues/13","id":301352476,"user":{"login":"marcoscaceres","id":870154,"avatar_url":"https://avatars2.githubusercontent.com/u/870154?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoscaceres","html_url":"https://github.com/marcoscaceres","followers_url":"https://api.github.com/users/marcoscaceres/followers","following_url":"https://api.github.com/users/marcoscaceres/following{/other_user}","gists_url":"https://api.github.com/users/marcoscaceres/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoscaceres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoscaceres/subscriptions","organizations_url":"https://api.github.com/users/marcoscaceres/orgs","repos_url":"https://api.github.com/users/marcoscaceres/repos","events_url":"https://api.github.com/users/marcoscaceres/events{/privacy}","received_events_url":"https://api.github.com/users/marcoscaceres/received_events","type":"User","site_admin":false},"created_at":"2017-05-15T00:52:55Z","updated_at":"2017-05-15T00:52:55Z","body":"Unfortunately, that's not possible because of the way the API is designed. The API doesn't know how to associate currency codes with language-tags: only knows how to translate a code into a language - hence you always need to provide the currency code ahead of time:\r\n\r\n```JS\r\nconst formatter = new Intl.NumberFormat(\"en-ca\", {\r\n  style: \"currency\",\r\n  currency: \"USD\", \r\n  currencyDisplay: \"name\"\r\n}); \r\n\r\n// \"1.00 US dollars\"\r\nformatter.format(1);\r\n```\r\n\r\n\r\n"}}
{"actor":{"display_login":"marcoscaceres"}}