On Wed, 2003-02-12 at 16:15, Konstantin Piroumian wrote:
[...]
> > Our idea is to simply pass multiple bundle names/locations to the
> > I18nTransformer, and it would check them one by one until the value is
> > found.
> >
> > A possible alternative would be that the bundle to be used is specified
> > explicitely when retrieving the key, e.g.
> > <i18n:text bundle="mybundle">key</i18n:text>
> > (and we'd also need a syntax for attributes)
> 
> Both possibilities would be fine.

We'll go with the second one (mentioning the bundle explicitely).

> As for the attributes syntax what about this:
> <input name="Submit" i18n:attr="name" i18n:bundle="mybundle">. This will
> limit to a single bundle,

Seems fine for me.

>  or maybe use namespaces:
> <input name="Submit" value="dynamic" i18n:attr="mybundle:name
other:value">?

I think this will cause confusion with namespaced attributes.
How about this:
<input name="mybundle:Submit" value="other:dynamic" i18n:attr="name
value">

(this approach assumes one's not using colons in i18n key names)

Now about the configuration, here's what I propose:

for the component-level configuration, something like this:

<map:transformer name="i18n" src="...">
  <catalogues default="cat1">
    <catalogue name="cat1">
      <name>...</name>
      <location>...</location>
    </catalogue>
    <catalogue name="cat2">
      <name>...</name>
      <location>...</location>
    </catalogue>
  </catalogues>
</map:transformer>

The default catalogue would be used if the catalogue is not explicitely
mentioned. The name attribute on the catalogue tag is the name that
would be used on the i18n tags:
<i18n:text catalogue="cat2">...</i18n:text>

On the component instance level, I thought of only allowing to override
the default bundle (and not specifying additional bundles):

<map:transform type="i18n">
   <map:parameter name="default-catalogue" value="cat2"/>
</map:transform>

All this will cause some backward-incompatible changes (though maybe it
would be possible to support the old-style and new-style configuration
concurrently).

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to