> From: Matthieu Sozeau [mailto:[EMAIL PROTECTED]] 
> 
> 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: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to