{"action":"created","issue":{"url":"https://api.github.com/repos/Mottie/Keyboard/issues/355","labels_url":"https://api.github.com/repos/Mottie/Keyboard/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/Mottie/Keyboard/issues/355/comments","events_url":"https://api.github.com/repos/Mottie/Keyboard/issues/355/events","html_url":"https://github.com/Mottie/Keyboard/issues/355","id":84784373,"number":355,"title":"Set language","user":{"login":"jolleman","id":1553686,"avatar_url":"https://avatars.githubusercontent.com/u/1553686?v=3","gravatar_id":"","url":"https://api.github.com/users/jolleman","html_url":"https://github.com/jolleman","followers_url":"https://api.github.com/users/jolleman/followers","following_url":"https://api.github.com/users/jolleman/following{/other_user}","gists_url":"https://api.github.com/users/jolleman/gists{/gist_id}","starred_url":"https://api.github.com/users/jolleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolleman/subscriptions","organizations_url":"https://api.github.com/users/jolleman/orgs","repos_url":"https://api.github.com/users/jolleman/repos","events_url":"https://api.github.com/users/jolleman/events{/privacy}","received_events_url":"https://api.github.com/users/jolleman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mottie/Keyboard/labels/Assistance%20Welcome","name":"Assistance Welcome","color":"207de5"},{"url":"https://api.github.com/repos/Mottie/Keyboard/labels/How%20to...","name":"How to...","color":"fbca04"},{"url":"https://api.github.com/repos/Mottie/Keyboard/labels/Layout","name":"Layout","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-03T21:44:30Z","updated_at":"2015-06-04T12:26:13Z","closed_at":null,"body":"How do i set a default keyset language?\r\n\r\nI want to set the default keyset to swedish.\r\n\r\ni tried with language : 'sv', but it doesnt work.\r\n\r\nHere is my code:\r\n```\r\n<script>\r\n\t$(function(){\r\n\r\n\t\tvar t,\r\n\t\t\to = '',\r\n\t\t\tlayouts = [];\r\n\r\n\t\t// Change display language, if the definitions are available\r\n\t\tshowKb = function(layout){\r\n\t\t\tvar kb = $('#multi').getkeyboard();\r\n\t\t\tkb.options.layout = layout;\r\n\t\t\t// true flag causes a keyboard refresh\r\n\t\t\tkb.reveal(true);\r\n\t\t};\r\n\r\n\t\t$.each(jQuery.keyboard.layouts, function(i, l){\r\n\t\t\tif (l.name) {\r\n\t\t\t\tlayouts.push([i,l.name]);\r\n\t\t\t}\r\n\t\t});\r\n\t\t// sort select options by language name, not\r\n\t\tlayouts.sort( function( a, b ) {\r\n\t\t\treturn a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;\r\n\t\t});\r\n\t\t$.each(layouts, function(i, l){\r\n\t\t\to += '<option value=\"' + l[0] + '\">' + l[1] + '</option>';\r\n\t\t});\r\n\r\n\t        $('#multi').keyboard({\r\n\t            layout: 'qwerty',\r\n\t            usePreview: false,\r\n\t            autoAccept: 'true',\r\n\t            language: 'sv',\r\n\t            css: {\r\n        // input & preview\r\n                input: 'form-control input-sm',\r\n        // keyboard container\r\n                container: 'structure', // jumbotron\r\n        // default state\r\n                buttonDefault: 'btn btn-default',\r\n        // hovered button\r\n                buttonHover: 'btn-primary',\r\n        // Action keys (e.g. Accept, Cancel, Tab, etc);\r\n        // this replaces \"actionClass\" option\r\n                buttonAction: 'active',\r\n        // used when disabling the decimal button {dec}\r\n        // when a decimal exists in the input area\r\n        buttonDisabled: 'disabled'\r\n    }\r\n\t \r\n\t        })\r\n\t\t// activate the typing extension\r\n\t\t.addTyping({\r\n\t\t\tshowTyping: true,\r\n\t\t\tdelay: 200\r\n\t\t})\r\n\t\t.previewKeyset();\r\n\r\n\t\t$('#lang')\r\n\t\t\t.html(o)\r\n\t\t\t.change(function(){\r\n\t\t\t\tvar kb = $('#multi'),\r\n\t\t\t\t\t$this = $(this),\r\n\t\t\t\t\t$opt = $this.find('option:selected'),\r\n\t\t\t\t\tlayout = $this.val();\r\n\t\t\t\t$('h2').text( $opt.text() );\r\n\t\t\t\tshowKb( layout );\r\n\t\t\t}).trigger('change');\r\n\r\n\t});\r\n\t</script>\r\n```\r\n\r\nAny help would be appreciated.\r\n\r\nRegards Joel"},"comment":{"url":"https://api.github.com/repos/Mottie/Keyboard/issues/comments/108871915","html_url":"https://github.com/Mottie/Keyboard/issues/355#issuecomment-108871915","issue_url":"https://api.github.com/repos/Mottie/Keyboard/issues/355","id":108871915,"user":{"login":"Mottie","id":136959,"avatar_url":"https://avatars.githubusercontent.com/u/136959?v=3","gravatar_id":"","url":"https://api.github.com/users/Mottie","html_url":"https://github.com/Mottie","followers_url":"https://api.github.com/users/Mottie/followers","following_url":"https://api.github.com/users/Mottie/following{/other_user}","gists_url":"https://api.github.com/users/Mottie/gists{/gist_id}","starred_url":"https://api.github.com/users/Mottie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mottie/subscriptions","organizations_url":"https://api.github.com/users/Mottie/orgs","repos_url":"https://api.github.com/users/Mottie/repos","events_url":"https://api.github.com/users/Mottie/events{/privacy}","received_events_url":"https://api.github.com/users/Mottie/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T12:26:13Z","updated_at":"2015-06-04T12:26:13Z","body":"Non of the greywyvern layouts include the language definitions... I haven't thought about how to combine the original layouts, Microsoft layouts and greywyvern layouts and include the language definitions. What should someone do if they want to use their own? Maybe I should separate out the language definitions from the layouts..."}}