cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: [RTl] i18n transformer
Date Tue, 30 Oct 2001 10:55:29 GMT
Hi!

> Peter Royal wrote:
> > ...
> > I agree that this is definitely the way to go. I'm offering up the work
> > I've done thus far as another, somewhat orthogonal change, to what
you've
> > proposed. Since we were talking about the I18nTransformer, I figured I'd
> > pipe up :)
> > ...
>
> Hi,
> as i follow this discussion and from experience of using the
> I18nTransformer
> I have some functional points it should be easy (for you? ;-) to add.
> I would make it self but I don't want to interfere with your plans.
>
> 1) I'd like to have in the catalogue an attribute called "alias", e.g.
>    <message key="abc">ABC</message>
>    <message key="xyz" alias="abc"/>
>    If called <i18n:text>xyz</i18n:text> it will be transformed to "ABC".

Where this can be used?

>
> 2) It would be nice to have an "adding feature", e.g.
>    <message key="hello">Hello</message>
>    <message key="world">World</message>
>    <message key="hi all" result="'hello' 'world'"/>
>    So "<i18n:text>hi all</i18n:text>" will result in "Hello World".

You can use:
<i18n:translate>
    <i18n:text>{0} {1}</i18n:text>
    <i18n:param>hi</i18n:param>
    <i18n:param>all</i18n:param>
</i18n:translate>

I think, that this is the task of the transformer to perform such operations
and not the dictionary's.

>
> 3) It would be good to have an "empty" translation.
>    Actually if we define <message key="rst"></message> this will result
> in
>    "untranslated text" or whatever is configured. Even if we put space
>    between the tags the behaviour is like that.

Hm... It's not correct. If there is a key in the dictionary then the result
must be whatever is its value.

Btw, have seen the recent changes in Avalon's i18n support?

Regards,
    Konstantin

>    We should define an attribute like 'empty="true"'
>    e.g. <message key="rst" empty="true"/> - this sould result in no
> output.
>
> Regards,
> Michael
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message