You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Konstantin Piroumian <kp...@apache.org> on 2002/04/26 19:03:46 UTC
[Announcement] Updates to i18n
Good <i18n:time-of-day />!
Summary
========
I18n samples are refactored and redesigned. I18nTransformer changed in an
incompatible way. LocaleAction has been fixed to support 'locale-attribute'
overrides. Details below.
I18nTransformer
=============
* I18nTransformer was modified to get sitemap parameter for locale
selection. (WARN!) The old behavior is not supported any more, so now the
usage will be like this:
<map:act type="locale">
...
<map:transform type="i18n">
<map:parameter name="locale" value="{locale}"/>
</map:transform>
</map:act>
where locale parameter is obtained using the LocaleAction.
Now URL part, request params, session attributes are also can be used, e.g.:
for request like '/en/docs', the pipeline can look like this:
<map:match pattern="*/*">
<map:generate src="{2}.xml"/>
<map:transform type="i18n">
<map:parameter name="locale" value="{1}"/>
</map:transform>
<map:transform src="style.xsl" />
<map:serialize/>
</map:match>
* Dependency on LocaleAction were removed from transformer.
* <i18n:param /> impementation has changed: 'sub-type' attribute is now
replaced with 'type'. Allowed values for 'type' attribute now are: 'number'
(buggy yet), 'currency', 'percent'. Thanks to Michael Enke
(michael.enke@wincor-nixdorf.com). (See
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7726 for the patch.
Michael, please, send the diff for 'number' formatting fix.).
LocaleAction
===========
LocaleAction was fixed to allow to change the locale attribute name. (There
was a bug that forced 'locale' name only). Also, now DEBUG information in
logs is formatted in a more readable way.
Samples
========
i18n samples are refactored and redesigned using new look & feel developed
at Apache Forrest. To see them get the latest source from CVS (HEAD branch),
build Cocoon, deploy, then enter this URL (for Tomcat):
http://localhost:8080/cocoon/samples/i18n/
Special thanks to Horst Rutter (horu@objectleague.com), Hahn Kurt
(kurt.hahn@etat.ge.ch), Olivier Lange (wire@petit-atelier.ch) for additional
translations.
To Do
=====
- Fix minor bug with number formatting
- Apply major contribution from Matthieu Sozeau (mattam@netcourrier.com)
for inline translations and markup inside of text and param elements
- Optimize dictionary lifecycle handling
Finally
=====
That's all. Comments and suggestions are welcome.
Enjoy!
--
Konstantin
_________________________________________
Konstantin Piroumian
Lead Developer
ICQ#: 2297575
( Work Tel#: +7 095 795 0520 * 1288
+ More ways to contact me
i See more about me
_________________________________________
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>