cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timm, Sean" <>
Subject XML Resource File?
Date Fri, 04 Feb 2000 19:29:25 GMT
I'm developing an XML-based resource class for various processors to load up
resource strings from an XML resource file.  It got me thinking that it
seems like it would be nice to have this generally available in Cocoon such
that you could call getResourceString at any time, and it would pull the
appropriate string based on what producer/processor you were currently in
for the language you specified.

Unfortunately, I'm probably the wrong guy to throw this into Cocoon since I
know next to nothing about localization (in other words, I've always written
English-only apps).

Maybe something like the following:
<?xml version="1.0"?>
<Strings source="my_processor">
  <String name="PASSWORD_REQUIRED">
    <Message id="1033">You must enter a password.</Message>
    <Message id="1065">wieuyr weurfhisud siufsd (some other

Then within my processor, I could do something like the following:

String message = SomeCocoonClass.getResourceString("PASSWORD_REQUIRED",

Does anyone else see this as useful, or is this ability already there, and
I'm completely wasting my time? :)

- Sean T.

View raw message