<
From version < 51.1 >
edited by Marius Dumitru Florea
on 2021/02/23
To version < 51.3 >
edited by Marius Dumitru Florea
on 2021/03/23
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,35 +4,14 @@
4 4  
5 5  XWiki can be set-up to support one or various languages.
6 6  
7 -{{groovy}}
8 -import groovy.json.*
7 +{{velocity}}
8 +#set($locales = $xwiki.getDocument('dev:Community.L10N.SupportedLocales.WebHome').getObjects('dev:Community.L10N.SupportedLocales.Code.LocaleClass'))
9 +XWiki has translations in ${locales.size()} languages:
9 9  
10 -def languages = []
11 -def stop = false
12 -def counter = 1
13 -def total = 0
11 +{{language showCode="true" codes="#foreach($locale in $locales)#if($locale.locale!='none')#if($foreach.index > 0),#end$locale.locale#end#end"/}}
12 +{{/velocity}}
14 14  
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 28  
29 -println "XWiki has translations in ${total} languages:"
30 -
31 -languages.each() {
32 - println "* ${it}"
33 -}
34 -{{/groovy}}
35 -
36 36  If you wish to help out improve translations, check our [[translation platform>>http://l10n.xwiki.org]].
37 37  
38 38  = Preferences =
... ... @@ -57,7 +57,7 @@
57 57  
58 58  = Page translations =
59 59  
60 -You can check the [[Information tab>>Documentation.UserGuide.Features.DocumentLifecycle.WebHome#HInformation]] at the bottom of the page to see the language of the current page, its original language, as well as the list of existing and missing page translations. You can use the links to access the available page translation or to create the missing ones.
39 +The __title__ and __content__ of a wiki page can be translated in multiple locales. For this you need to configure your wiki to be multilingual and set the list of supported locales. Once you do this XWiki will try to show you the title and content of the page translation that matches the current user interface locale. If the page was not translated yet then XWiki will show you the title and content from the original version of the page. You can check the [[Information tab>>Documentation.UserGuide.Features.DocumentLifecycle.WebHome#HInformation]] at the bottom of the page to see the locale of the current page, its original locale, as well as the list of existing and missing page translations. You can use the links to access the available page translations or to create the missing ones.
61 61  
62 62  = Edit a translation =
63 63  

Get Connected