cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: ResourceBundles - was [RT] i18n
Date Tue, 13 Jun 2000 12:51:29 GMT
Stefano Mazzocchi wrote:

> Hey, I like this and I think this is general enough to be incorporated
> into Avalon as a very common block (like logging, thread management,
> object storing and such).

It may end up being just an extension of the ResourceBundle.  The i18n
file loading and such might constitute making it a block, I'll breach it with
Federico and get his input.  I'm still getting a handle on what architecturally
will constitute an architectural component/block, and what should simply
be a class.  ResourceBundle implicitly has a lot of that functionality in
it--so it may not constitute being a block or even a component.

Then again, to fit in the framework, and have an XMLResourceBundle
be part of a generic i18n component it would make sense.

> Just one thing on the schema: the use of "id" could create naming
> problems since ids cannot be repeated inside the same file. So I'd
> suggest:
> <?xml version="1.0"?>
> <resources xml:lang="en">
>   <group name="error">
>     <resource name="500">Internal Server Error</resource>
>     <resource name="404">Page not found</resource>
>   </group>
>   <group name="uri">
>     <resource name="addUser">user/add</resource>
>     <resource name="killUser">user/obliterate</resource>
>   </group>
>   <group name="form">
>     <resource name="userName" value="Enter the user's name here"/>
>   </group>
> </resource>
> Note how the syntax
>  <resource name="xxx" value="yyy">
> is equivalent to
>  <resource name="xxx>yyy</resource>
> which is perfectly legal and allows you to use the markup you like the
> most.

I like that.

View raw message