cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: Changes in I18nTransformer
Date Tue, 16 Apr 2002 07:34:38 GMT
> From: Matthieu Sozeau [mailto:mattam@netcourrier.com] 
> 
> This patch is a work-in-progress. Markup in params seems 
> clear and stable but in-place translation has not been much discussed.
> Solutions are :
> 1. 
> <i18n:choose>
>   <i18n:when test="en">Hello</i18n:when>
>   <i18n:when test="ru">ðÒÉ×ÅÔ</i18n:when>
>   <i18n:otherwise>...</i18n:otherwise>
> </i18n:choose>
> 
> 2.
> <i18n:if locale="en_US">Program</i18n:if>
> <i18n:if locale="en_GB">Programm</i18n:if>
> 
> perhap's the both must be implemented ? 

Yes, I think that both could be useful and not only for translation.
Conditional processing depending on the locale can be used to adapt content
for a specific locale, e.g. right-to-left layouts, etc. And note, that
condition must not be strictly checked, say <i18n:if locale="en" /> shoud be
true also for en_US, en_GB_EURO, etc. (See i18nUtils.java in i18n package.
It contains some helper mthods and I plan to move there all the rest
formatting code from transformer).

> I think a default translation is needed so i'll change my 
> implementation for solution 2 tomorrow and finish this patch 
> to merge with current cocoon (also updating the doc which 
> must change a little). 

That would be fine. Are your changes keep the backword compatibility? Try
i18n samples and it would be also great if you could add your changes demo
to them.

> 
> Any feedback/criticism appreciated.
> 
> P.S: what is the preferred format for submission of large 
> patches (apart from diff -u)?

Maybe just to zip the affected source files and send it me?

Konstantin

> -- 
> "Black holes are where God divided by zero." - Steven Wright
> 
> MaT|TaM
> 

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


Mime
View raw message