<
From version < 4.6 >
edited by Philipp Roessler
on 2009/09/02
To version < 5.1 >
edited by Vincent Massol
on 2010/03/04
>
Change comment: Improved section about translation of object

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.tapaya
1 +XWiki.VincentMassol
Content
... ... @@ -49,9 +49,14 @@
49 49  
50 50  1.1 I18n of XWiki objects
51 51  
52 -This is impossible to have different objects for different page translations for now.
53 -However, you can emulate it.
52 +This is currently not implemented (see our logged issue: [XWIKI-69>http://jira.xwiki.org/jira/browse/XWIKI-69]). There are 2 workarounds you can use:
53 +* Have several objects, one for each language, with a language field, and then decide which object to use (for example in a Class Sheet, based on the current language).
54 +* Use Velocity scripting to do an IF in your object. For example, you could have:
55 +{code:none}
56 +#if ($context.language == "fr")
57 + French texts
58 +#else
59 + Default texts
60 +#end
61 +{code}
54 54  
55 -A possible solution is to have one object per language and add a language property in the objects.
56 -So you can filter objects by language in a page.
57 -
XWiki.XWikiComments[1]
Date
... ... @@ -1,1 +1,1 @@
1 -2009-09-02 09:48:21.575
1 +2009-09-02 09:48:21.0

Get Connected