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

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