Forums / General / Translation of select options
Carlos Revillo
Monday 15 October 2007 11:30:14 am
Hello.
I've a custom class with a selection field in it. i would like to offer the user these two options in his language, but i don't know how. i mean, let's suppose i have a select field with the options "one", "two" and "three". i would like to show these options to the user, but if the user is entering the spanish zone of my site i would like to show hime the options "uno", "dos" and "tres".
is this possible? thank you.
André R.
Monday 15 October 2007 12:25:24 pm
Tried to translate the class?If that doesn't work, you can alwayse override the edit and view templates for that attribute to translate the values.
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Monday 15 October 2007 1:48:40 pm
Thank you Andre.
I tried that. i tried to edit the class in spanish, and i could change "labels" for fields. i mean, i can change "number" for "número" (spanish word for number). but if, in the spanish version of the class i change "one" to "uno", i always see "uno" for this option, in english and spanish...
do i miss something related to class translation?thank you,.
Monday 15 October 2007 11:53:56 pm
No probably not, seems the class translation is restricted to class and attribute names.So you can either do the other thing I mentioned (translate it in the templates), or a third option would be to use object relations list set up in drop down mode. Then you can translate the relations as you wish.
Script start
Module start 'content'
Module end 'content'
Script end
Time used to render debug report: 0.0002 secs