[opencms-dev] changing locale manager and handler on OpenCms 6.2.X

Nacho Fernandez snatcho at gmail.com
Mon May 26 21:22:02 CEST 2008


Hi list.

I have been trying to change the locale handler and manager behaviour on
OpenCms 6.2.X (and I am failing), following this steps:

1.- Configure a different LocaleHandler on opencms-system.xml called
MyLocaleHandler
2.- Copying all code from CmsLocaleHandler to MyLocaleHandler and changing
all references to CmsLocaleManager to MyLocaleManager
3.- Copying all code from CmsLocaleManager to MyLocaleManager and changing
the code from the method getI18nInfo(HttpServletRequest req, CmsUser user,
CmsProject project, String resource) to act as I need
4.- Compiling the code, placing it under the right folder and restarting
tomcat.

The results are that my code is ignored, I mean the canges made to
MyLocaleManager. Debugging the executed code I have the impression that even
though the initial configuration is read and MyLocaleHandler is stablished
as so, only MyLocaleManager's constructor is called and when OpenCms should
call the getI18nInfo it actually calls the original class (debug lines
places on my code never appear). Debugging further it even seems that the
locale handler is initialized with OpenCms.getLocaleManager() and that
doesn't ever call a method from the locale handler to know the actual locale
manager that should be used. If I am not reading the code wrong, this looks
like a bug.

Have any of you tried to change the locale handler on opencms-system.xml?
Has it worked? Is the behaviour I mention actually a bug?

Thanks in advance for any response or hint. Greetings,

Nacho.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080526/400cc7c5/attachment.htm>


More information about the opencms-dev mailing list