Forums / Developer / Translation in extension datatypes

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Translation in extension datatypes

Author Message

Hans Melis

Monday 08 September 2003 5:46:09 am

Hi all,

I'm working on an extension that adds a datatype to ezp. I noticed that the standard datatypes have certain strings marked for translation, but I'm not sure how to do that in an extension.

For templates, there is the x18n operator (pre-3.1), and the regular i18n from 3.2 onwards. But the strings I want to mark are inside the PHP code of the datatype.

The default datatypes have something like this in their constructor:
ezi18n( 'kernel/classes/datatypes', "ISBN", 'Datatype name' )

How do you use that in an extension datatype? I would guess like this:
ezi18n( 'extension/<extension_name>/datatypes', 'MyDatatype', 'Datatype name' )

--
Hans

Hans
http://blog.hansmelis.be