avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neeme Praks" <neeme.pr...@one.ee>
Subject RE: i18n message catalogue format
Date Sun, 30 Sep 2001 10:47:11 GMT

Oeh, finally got some time to go through the Apache mailing list archives
and found some interesting postings :-)
(Better late than never)

Anyway, I would say that the issue of single file vs. multiple files is more
an isse of scale:
* bigger sites prefer to separate languages to different files, so different
translators can work on then separately
* smaller sites usually prefer single file approach, as they have usually
one/few translator(s) and get a better overview this way.

So, I think we should support both ways (or at least make it easy to extend
the XMLResourceBundle, to achieve custom language mappings).

Here I see two possibilities:
* override XMLResourceBundleFactory.getFileName(String name, Locale loc)
method, to give users the ability to map the bundles to the filesystem in a
non-standard way (I have a non-standard mapping in production already)
* provide some method to convert from Java properties file syntax to XPath
and allow to override this method: user requests for "foo.bar" and this
could be translated to "/foo/bar" or
"translations/key[@name='foo.bar']/trans". This translation would most
probably have to happen at the time when the bundle is first loaded.

The first "feature" is already supported by the current implementation and
the second shouldn't be that difficult to add. Then we can provide some
default mappings and message catalogue formats/schemas, but others can
extend the default.


> -----Original Message-----
> From: Jeremias Maerki [mailto:jeremias.maerki@outline.ch]
> Sent: Sunday, July 15, 2001 11:48 PM
> To: Avalon Development
> Subject: Re: i18n message catalogue format
> > What are your thoughts ? suggestions ?
> In my applications I use the following format:
> <translations default="de">
>   <key name="invoice.type.final">
>     <trans xml:lang="de">Schlussrechnung</trans>
>     <trans xml:lang="fr">Facture finale</trans>
>     <trans xml:lang="it">Fattura finale</trans>
>   </key>
>   <key name="......
> </translations>
> Nothing special, except that I'd like to point you to the xml:lang
> attribute which is meant for internationalization stuff. See "2.12
> Language Identification" in "XML 1.0 2nd edition". This format was
> easily understood by translators, provides a good overview and holds
> everything together (no separated files to synchronize).
> Jeremias Märki
> mailto:jeremias.maerki@outline.ch
> Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
> Internet http://www.outline.ch
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

View raw message