Hi Jon

I have choiche "conservative approach" .
For my site it's necessary change the language at runtime ,
but i don't know if Turbine used the service for other point of framework .
Extends the turbine service and rewrite only the method for change the
language
(and the classes around it ..CustomLocalization, CustomLocalizationTool and
CustomLocalizationService)
permit to use the service with the new functionality and avoid to
malfunction of Turbine;
I think that the work of Turbine Developers are great and I could' not added
nothing to the code of Turbine.
This is my solution , not necessary the best , but work fine in my site.
The problem of the bundles in my site are not compared because the
localization files are in one bundle and the content of
the portlet are searched in the database in more language.
I write the searchKey to manteine the approach more conservative possible.

Sorry for my bad english.

Massimiliano


----- Original Message -----
From: "Jon Evans" <[EMAIL PROTECTED]>
To: "Massimiliano Dessi" <[EMAIL PROTECTED]>
Cc: "Jetspeed Developers List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 11:12 AM
Subject: Re: PATCH LocalizationService


Hi Massimiliano,

Massimiliano Dessi wrote:
> Please see the attached patch.
>
> The different with the previous version it's the private method
> searchKey(Locale locale, String key)
> used by getString(String bundleName, Locale locale, String key).
> The key it's search in the firstbundle, if it' not found it's search in
the
> second and so on until the key it's found.

But, that functionality is already there in TurbineLocalizationService.
  Why duplicate it?

Also I don't see the point of re-implementing all of the methods you
are overriding, then calling super.<method> every time.  Isn't that the
whole point of extending another class?  Why stop there, why not also
re-implement getClass() etc.? :-)

The only thing needed in JetspeedLocalizationService is the
functionality to choose a Locale based on a request parameter, that's
why my patch removed all methods except getLocale(RunData).  It works
fine, and although I'm not using it in a production environment yet I
have 2 development sites using that code.

Jon





--

Merlin Information Systems Limited,

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN

Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112



http://www.misgl.com

Provider of IT Services and Online Portal Support Services.



Confidentiality:

The information contained in this email (including any attachments) is
confidential and is intended solely for the use of the named addressee.
Access, copying or re-use of the information in it by any other person is
not authorised. If you are not the intended recipient, please notify us
immediately by telephone or by e-mail to [EMAIL PROTECTED]





*** This mail has been scanned for viruses ***




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




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

Reply via email to