struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schachter, Michael" <MSchach...@Bluestone.com>
Subject RE: i18n and Resources
Date Tue, 20 Feb 2001 00:07:41 GMT

Craig,

>> Hi,
>>
>> I'm attempting to develop a fuller form of internationalization for
>>Struts,
>> which includes retrieving content from more than something such as a
>> ResourceBundle.  The basic idea is that you have a Resource, which is
>>an
>> interface that represents anything that has internationalized content.
>>It
>> has a method that looks basically like this:
>>
>> public byte[] getData(String key, Locale locale, TimeZone timeZone);
>>
>> Of course, time zone is optional, it would depend on the
>>implementation
>> whether or not to use it.
>>

>It would be interesting if the existing MessageResources mechanisms (and
>the
><bean:message> tag) could be layered on top of this abstraction in some
>convenient way -- either by creating an implementation of
>MessageResources or
>by extending your Resource abstraction to include a getString() method.

Funny thing is, the current way I'm designing this is this Resource
abstraction, the manager of resources, and anything else, is actually just a
part of an implementation of a Localization Service I'm developing.  There
probably wouldn't be too much of a problem with a MessageResources
implementation using the service.

I hate the fact that the word "service" is so overused, but in this context
it would be an implementation of an interface residing at the request scope
of an application.

I'm still pushing for a lightweight, application level service framework
within Struts, I'm just working on a proof of concept and some real code
before I go and introduce anything, probably not a great move community-wise
on my part.  

For people unfamiliar with the service framework I'm talking about,
basically it's a set of standard interfaces for common application
functionality such as localization, device detection, object pooling, etc.
The most common functionality would be included with implementations with
Struts, more time-intensive implementations could hopefully be represented
as a set of plugins/adapters for commercial vendor products that provide
that functionality.

In some ways I'm looking for this LocalizationService to supercede the
current MessageResources functionality.  I attached the interface if anyone
wants to take a look at it.  With the functionality represented by the
Resource interface, I'm nearly done an implementation.  

Whichever road the Struts community chooses to go (ie, whether or not to
include this service framework), I'd like to add the resource interface and
it's companions.  A MessageResources implementation using this wouldn't be a
big deal.


Mime
View raw message