Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,37 +2,39 @@ 2 2 {{toc/}} 3 3 {{/box}} 4 4 5 -XWiki can be set-up to support one or various languages. As of September 2011 XWiki supports 25 languages:5 +XWiki can be set-up to support one or various languages. 6 6 7 -* Catalan (ca) 8 -* Chinese, Simplified (zh) 9 -* Chinese, Traditional (zh_TW) 10 -* Croatian (hr) 11 -* Czech (cs) 12 -* Dutch (nl) 13 -* English (en_US) 14 -* French (fr) 15 -* Galician (gl) 16 -* German (de) 17 -* Greek (el) 18 -* Hindi (hi) 19 -* Hungarian (hu) 20 -* Italian (it) 21 -* Korean (ko) 22 -* Latvian (lv) 23 -* Norwegian (no) 24 -* Polish (pl) 25 -* Portuguese (pt) 26 -* Romanian (ro) 27 -* Russian (ru) 28 -* Slovak (sk) 29 -* Spanish (es) 30 -* Swedish (sv) 31 -* Ukrainian (uk) 32 -* Vietnamese (vi) 7 +{{groovy}} 8 +import groovy.json.* 33 33 34 -To see the exact status for each language or if you wish to help, check our [[translation wiki>>http://l10n.xwiki.org/xwiki/bin/view/L10N/]]. 10 +def languages = [] 11 +def stop = false 12 +def counter = 1 13 +def total = 0 35 35 15 +while (!stop) { 16 + def json = "https://l10n.xwiki.org/api/languages/?page=${counter}".toURL() 17 + .getText(requestProperties: [Accept: 'application/json', Authorization: 'q6VxVYaJL7cg2ceCAubkl9vXrLzyshOHa3GlG5RX']) 18 + def root = new JsonSlurper().parseText(json) 19 + root.results.each() { 20 + languages.add("[[${it.name} (${it.code})>>https://l10n.xwiki.org/languages/${it.code}/]]") 21 + total++ 22 + } 23 + counter++ 24 + if (!root.next) { 25 + stop = true 26 + } 27 +} 28 + 29 +println "XWiki has translations in ${total} languages:" 30 + 31 +languages.each() { 32 + println "* ${it}" 33 +} 34 +{{/groovy}} 35 + 36 +If you wish to help out improve translations, check our [[translation wiki>>http://l10n.xwiki.org/xwiki/bin/view/L10N/]]. 37 + 36 36 = Preferences = 37 37 38 38 Setting up languages is done in the Administration (link on the top left of every page).