{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/pandoc/issues/1614","labels_url":"https://api.github.com/repos/jgm/pandoc/issues/1614/labels{/name}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/1614/comments","events_url":"https://api.github.com/repos/jgm/pandoc/issues/1614/events","html_url":"https://github.com/jgm/pandoc/issues/1614","id":42172176,"number":1614,"title":"lang attribute fits for latex but not for html lang-attribute-value","user":{"login":"maybegeek","id":1978651,"avatar_url":"https://avatars.githubusercontent.com/u/1978651?v=3","gravatar_id":"","url":"https://api.github.com/users/maybegeek","html_url":"https://github.com/maybegeek","followers_url":"https://api.github.com/users/maybegeek/followers","following_url":"https://api.github.com/users/maybegeek/following{/other_user}","gists_url":"https://api.github.com/users/maybegeek/gists{/gist_id}","starred_url":"https://api.github.com/users/maybegeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maybegeek/subscriptions","organizations_url":"https://api.github.com/users/maybegeek/orgs","repos_url":"https://api.github.com/users/maybegeek/repos","events_url":"https://api.github.com/users/maybegeek/events{/privacy}","received_events_url":"https://api.github.com/users/maybegeek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jgm/pandoc/labels/enhancement","name":"enhancement","color":"d7e102"},{"url":"https://api.github.com/repos/jgm/pandoc/labels/Minor","name":"Minor","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2014-09-08T07:54:40Z","updated_at":"2015-08-20T19:32:50Z","closed_at":null,"body":"Hi there,\r\n\r\nfor documents in german language I use\r\n\r\n* **lang: ngerman**\r\n* **mainlang: german**\r\n\r\nthe first beeing for babel, second for polyglossia (i use mainly xelatex). If I pandoc to html the lang-attribute (ngerman) gets used but **ngerman** is not a valid value for the html-attribute (nor would be german).\r\n\r\nhtml needs something like **de** or **de-DE**.\r\n\r\nThe documentation says **lang** *language code for HTML or LaTeX documents*.\r\n\r\nAnd therefore the documentation is completely wright, you could use it for the one or the other, not both at the same time. \r\n\r\nperhaps this needs clarification in the docs and/or a different approach. Meanwhile you can always override the yaml attributes in your central file with direct command line switches.\r\n\r\nall the best,\r\nchristoph"},"comment":{"url":"https://api.github.com/repos/jgm/pandoc/issues/comments/133143193","html_url":"https://github.com/jgm/pandoc/issues/1614#issuecomment-133143193","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/1614","id":133143193,"user":{"login":"ousia","id":203767,"avatar_url":"https://avatars.githubusercontent.com/u/203767?v=3","gravatar_id":"","url":"https://api.github.com/users/ousia","html_url":"https://github.com/ousia","followers_url":"https://api.github.com/users/ousia/followers","following_url":"https://api.github.com/users/ousia/following{/other_user}","gists_url":"https://api.github.com/users/ousia/gists{/gist_id}","starred_url":"https://api.github.com/users/ousia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ousia/subscriptions","organizations_url":"https://api.github.com/users/ousia/orgs","repos_url":"https://api.github.com/users/ousia/repos","events_url":"https://api.github.com/users/ousia/events{/privacy}","received_events_url":"https://api.github.com/users/ousia/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T19:32:50Z","updated_at":"2015-08-20T19:32:50Z","body":"@jgm and @mb211,\r\n\r\n* `language` is more intuitive for non-technical users.\r\n\r\n* I think it is better to have a single language metadata field, not two.\r\n\r\n* `language` is required for ePub document language, so:\r\n\r\n    * `language: de-DE` would be required for ePub documents.\r\n\r\n    * But If we want the same source to generate other formats, `lang: de-DE` would be also required. Sorry, but this doesn’t seem reasonable to me.\r\n\r\n    * The point here is to reject other values than ISO 639 or BCP-47 formats for languages.\r\n\r\n      The issue is not the metadata field name, but the values that it accepts."}}