Changes for page Internationalization

Last modified by Thomas Mortagne on 2023/10/10

<
From version < 49.1 >
edited by Marius Dumitru Florea
on 2020/04/29
To version < 51.2 >
edited by Vincent Massol
on 2021/03/10
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.mflorea
1 +XWiki.VincentMassol
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 =
... ... @@ -69,6 +69,10 @@
69 69  
70 70  From Wiki and WYSIWYG edit modes, as well as when editing in-place, you can switch to a different page translation or create a missing translation.
71 71  
51 +When editing in-place you get a "Translate" button if the edited page doesn't have a translation for the current locale. Click on the "Translate" button if you wish to create the missing translation, otherwise all the changes you do will be saved to the original version of the page.
52 +
53 +{{image reference="edit-inplace-new-translation.png"/}}
54 +
72 72  From the Wiki and WYSIWYG edit modes you are able to edit the default (original) page language. The default language is indicated on the right "Document Information" panel as shown below:
73 73  
74 74  {{image reference="DefaultLanguageEN.PNG"/}}
edit-inplace-new-translation.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.mflorea
Size
... ... @@ -1,0 +1,1 @@
1 +112.2 KB
Content

Get Connected