eZ Community » Forums » Developer » How to set up a non translatable...

How to set up a non translatable datatype ?

How to set up a non translatable datatype ?

Monday 09 November 2009 4:39:08 pm - 1 reply


I'm coding a datatype, but it contains only specfic data, and i don't want the user to be able to set different values for different languages for this datatype.

In fact, i'd like that any attribute with this datatype to be untranslatable.

I can, of course, set it in the admin interface, but is it possible to set it directly in the datatype class ?

i've tried, the following code in my datatype constructor:

$this->eZDataType(self:big-smile.gif EmoticonATA_TYPE_STRING, "Extension..", array('translation_allowed' => false));

It shows in the interface the language is disabled for this attribute, so it seems to work, but NOT!

in the ezcontentclass_attribute, i can see for this attribute that the fied 'can_translate' is at 1, and not 0

Any idea is welcome

Wednesday 11 November 2009 11:43:23 pm


In your datatype's "edit" template :

{if eq($attribute.object.initial_language_code,$attribute.language_code)}

inputs... etc....


nothing, your not in the initial language



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from