Changes for page L10N Conventions

Last modified by Alex Cotiugă on 2018/10/08 16:15

From version 8.3
edited by Sergiu Dumitriu
on 2015/03/05 22:11
To version 9.1
edited by Alex Cotiugă
on 2018/10/08 16:15
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Sergiu
1 +xwiki:XWiki.acotiuga
Content
... ... @@ -81,11 +81,13 @@
81 81  == Translating XClasses ==
82 82  
83 83  * To translate the **field prettyName** (label), translate ##Space.ApplicationClass_fieldName##
84 -* Individual **static list values** can be translated using ##Space.ApplicationClass_fieldName_value##, where ##value## is the key stored internally; this means that for example the user type will always be stored internally as ##advanced##, even if we display it as //Avansat// when browsing in Romanian. The internal value can be obtained using ##$obj.getProperty('propName').value##, while the translated string is displayed when using ##$doc.display('propName')##, ##$obj.propName##, or ##$obj.get('propName')##
85 -* For **boolean fields** there's also a special way of translating the values for true and false, using the //Display type// (##displayType##) meta-property. By default ##yesno## is assumed, but other possible predefined values include ##truefalse## to get //True// or //False//, ##active## to get //Active// or //Inactive//, and ##allow## to get //Allow// or //Deny//. Additional display types can be defined by providing translations for ##newtype_0## and ##newtype_1##, for example:((({{code language="none"}}
84 +* Individual **static list** or **database list** values can be translated using ##Space.ApplicationClass_fieldName_value##, where ##value## is the key stored internally; this means that for example the user type will always be stored internally as ##advanced##, even if we display it as //Avansat// when browsing in Romanian. The internal value can be obtained using ##$obj.getProperty('propName').value##, while the translated string is displayed when using ##$doc.display('propName')##, ##$obj.propName##, or ##$obj.get('propName')##
85 +* For **boolean fields** there's also a special way of translating the values for true and false, using the //Display type// (##displayType##) meta-property. By default ##yesno## is assumed, but other possible predefined values include ##truefalse## to get //True// or //False//, ##active## to get //Active// or //Inactive//, and ##allow## to get //Allow// or //Deny//. Additional display types can be defined by providing translations for ##newtype_0## and ##newtype_1##, for example:(((
86 +{{code language="none"}}
86 86  enabled_0=Disabled
87 87  enabled_1=Enabled
88 -{{/code}})))
89 +{{/code}}
90 +)))
89 89  
90 90  = Updating translations =
91 91  

Get Connected