{"action":"created","issue":{"url":"https://api.github.com/repos/simia-tech/caddy-locale/issues/1","repository_url":"https://api.github.com/repos/simia-tech/caddy-locale","labels_url":"https://api.github.com/repos/simia-tech/caddy-locale/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/simia-tech/caddy-locale/issues/1/comments","events_url":"https://api.github.com/repos/simia-tech/caddy-locale/issues/1/events","html_url":"https://github.com/simia-tech/caddy-locale/issues/1","id":153623789,"number":1,"title":"Help me fill out the docs","user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-07T23:20:18Z","updated_at":"2016-05-08T08:18:36Z","closed_at":null,"body":"I've got the docs for this add-on started but need help filling out exactly what it does and being more specific about what is required, what's not, what default values are (if any), and what locale names are acceptable. Also looking for an example (preferably just of the `locale` directive, not whole Caddyfile, if possible).\r\n\r\nCan you help?\r\n\r\nHere's what I've got so far.\r\n\r\n```markdown\r\n\r\nlocale detects the client's locale. It sets a header field named Detected-Locale with the value. It also creates a new [replacable value](/docs/placeholders) `{locale}` with the detected locale.\r\n\r\n### Syntax\r\n\r\n<code class=\"block\"><span class=\"hl-directive\">locale</span> <span class=\"hl-arg\">[<i>locale\\_list...</i>]</span> {\r\n    <span class=\"hl-subdirective\">detect</span>    <i>methods...</i>\r\n\t<span class=\"hl-subdirective\">cookie</span>    <i>name</i>\r\n\t<span class=\"hl-subdirective\">available</span> <i>locale\\_list...</i>\r\n\t<span class=\"hl-subdirective\">path</span>      <i>base\\_path</i>\r\n}</code>\r\n\r\n- **locale\\_list...** is the list of available locales. The first one will be used as default.\r\n- **methods...** is the list of ways to detect the locale. Allowed values are `cookie` (which reads the locale from a cookie) and `header` (which reads the Accept-Language header).\r\n- **name** is the name of the cookie from which to read the locale.\r\n- **base\\_path** is the base path prefix to match, if you want locale detection to be scoped to certain paths only.\r\n\r\n\r\n### Examples\r\n\r\nTODO: Description of what this does\r\n\r\n<code class=\"block\"><span class=\"hl-directive\">locale </span> <span class=\"hl-arg\">en de</span> {\r\n\t<span class=\"hl-subdirective\">detect</span> cookie header\r\n}</code>\r\n```\r\n\r\nAlso, what happened to the `{locale}` placeholder? Does this package still create it? (I haven't found it in search results.)"},"comment":{"url":"https://api.github.com/repos/simia-tech/caddy-locale/issues/comments/217703030","html_url":"https://github.com/simia-tech/caddy-locale/issues/1#issuecomment-217703030","issue_url":"https://api.github.com/repos/simia-tech/caddy-locale/issues/1","id":217703030,"user":{"login":"phifty","id":213830,"avatar_url":"https://avatars.githubusercontent.com/u/213830?v=3","gravatar_id":"","url":"https://api.github.com/users/phifty","html_url":"https://github.com/phifty","followers_url":"https://api.github.com/users/phifty/followers","following_url":"https://api.github.com/users/phifty/following{/other_user}","gists_url":"https://api.github.com/users/phifty/gists{/gist_id}","starred_url":"https://api.github.com/users/phifty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phifty/subscriptions","organizations_url":"https://api.github.com/users/phifty/orgs","repos_url":"https://api.github.com/users/phifty/repos","events_url":"https://api.github.com/users/phifty/events{/privacy}","received_events_url":"https://api.github.com/users/phifty/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T08:18:36Z","updated_at":"2016-05-08T08:18:36Z","body":"Locale can have the form `en` or `en-US` (separated with a dash)."}}