translating options in Selection attribute - bug?

Author Message

Michal Slocinski

Wednesday 30 July 2008 11:43:55 am

Hi,

I just noticed following issue:

I have a class with Selection attribute which is information collector.

When I translate this class to different language and change for example attribute name - it's properly applied. But if I translate option of this attribute - all translations of this option have value of translation which I entered as last one.

So for example, attribute Selection in eng-GB has option: 'good morning'

Now, I translate whole class and attribute to ger-DE and change this option to become: 'guten tag'

Result: both versions of this class (eng-GB and ger-DE) have same option 'guten tag' in this Selection attribute.

I discovered this on 4.0.1rc1 and noticed same behavior on 4.0 - are you aware of this problem and can someone confirm it?

Michal

André R.

Wednesday 30 July 2008 3:25:27 pm

Its not a bug, eZ Publish doesn't currently support translation on class attribute values (default values + selection values) only name of the attribute and name of the class.

A discussion on class enhancements:
http://ez.no/developer/forum/setup_design/content_class_attribute_description

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

Michal Slocinski

Wednesday 30 July 2008 3:35:01 pm

that's not pretty :-/

any plans to implements this? I'll have to workaround it somehow...

Piotrek Karaś

Wednesday 30 July 2008 9:39:51 pm

Michal,

It is definitely possible to implement with some extension-writing skills. I have a custom extension made for that (for checkboxes only, not all selection modes). I'm not sure if I will be able to share that, but the idea goes like this:

- there is an extra tab and interfaces for managing 1:n->1:n db model (category set -> category -> category translation); those make it possible to create sets that contain any number of identifier-named categories that can be assigned translations in any language available
- there is a special i18n operator for figuring out whether there is a translation for a category in this particular language, or if identifier should be used as a last resort.
- there is a datatype, for which you define which category set to use during class definition. It also introduces one more db table for actually reflecting object-category n:n relation.

As a result, categories are translated automatically (if the translations had been prepared), but again - the attribute itself is not translatable - it will have the exact same selection for each document translation (which was what we needed).

One good thing about this model is that we can categorize multiple class objects in this way, using one category set.

I'll see if we're able to share the extension.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Michal Slocinski

Thursday 31 July 2008 12:34:36 am

Thanks for hints, maybe it's time to start digging bit more into eZ internals ;-)

Kristof Coomans

Thursday 31 July 2008 12:41:42 am

Just for the reference: http://issues.ez.no/13248 : ezselection datatype translation not possible

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Ronny Vedå

Thursday 19 March 2009 3:32:50 pm

Now that 4.1 is done, can eZ Systems PLEASE put some resources into implementing translation of selection values.

Customers are not happy about this issue at all.

André R.

Friday 20 March 2009 12:42:06 am

We probably will.

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

J-A Eberhard

Sunday 29 March 2009 11:37:06 pm

Hi,

I hope eZ can put some works on this issue. This is just terribly important to claim that eZ is truly multilingual.

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Andreas Kaiser

Wednesday 29 April 2009 7:16:29 am

Yes, this is really important...

just opened a enhancement ticket (last one referring to this was some years old...)

By the way, i solved this for a client using an override of ezselection.tpl and changing:

{$Options.item.name|wash( xhtml )}

to

{$Options.item.name|i18n("example/options")|wash( xhtml )}

Of course very manual (for example when updating or adding options ts file has to be updated in all languages) but it works... :)

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

André R.

Wednesday 07 April 2010 5:15:14 am

Since this topic popped up again on twitter today, here is current progress:

What is left is for someone to complete ezselection2 with support for data_text_i18n and eventually upgrade script for ezselection -> ezselection2 so it can be included in eZ Publish and replace ezselection.

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

Helle Andersen

Thursday 29 April 2010 6:58:05 am

Just to let you know that it is very important to be able to translate selection datatypes - since this is not possible, we have not yet bothered to use class translations...... And we have to resolve to some pretty unlogical work-arounds in order to translate selections....

(I cannot quite figure out from this very short description how this low level support works in 4.3.....)

Richard Bayet

Friday 20 August 2010 5:05:07 am

"

Since this topic popped up again on twitter today, here is current progress:

What is left is for someone to complete ezselection2 with support for data_text_i18n and eventually upgrade script for ezselection -> ezselection2 so it can be included in eZ Publish and replace ezselection.

"

André, as far as I understood, the role of data_text_i18n is to store translatable "default values" (default ezstring value, default ezinteger value, etc), is that it ?

If the answer is yes, on a pure practical point of view, does anyone really need to support it in ezselection2 ?

Because if ezselection2 only lacks this (but DOES support multilingual options on the go) and an update script, I would consider it more beta than alpha for my personal use...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.