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
([EMAIL PROTECTED]). (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 ([EMAIL PROTECTED]), Hahn Kurt
([EMAIL PROTECTED]), Olivier Lange ([EMAIL PROTECTED]) for additional
translations.

To Do
=====
    - Fix minor bug with number formatting
    - Apply major contribution from Matthieu Sozeau ([EMAIL PROTECTED])
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to