cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spectron International, Inc." <spect...@coqui.net>
Subject Set locale with an action
Date Tue, 07 May 2002 18:35:02 GMT
I want to be able to set the locale-attribure for the request in an action.
I have an action that reads the locale from a database and I use the
following to set the locale:

Request request=ObjectModelHelper.getRequest(objectModel);
request.setAttribute('locale-attribute',locale);

I have tried, 'locale-attribute', 'language-attribute' but it doesn't work.
This is what I get in the log (the first 2 messages are from my action, so
is reading the locale from the database ok):

DEBUG (2002-05-07) 14:08.33:283
[sitemap.action.get-locale](/cocoon/msim/MainMenu2)
SocketListener-1/MyAction: Using datasource [msim].
DEBUG (2002-05-07) 14:08.33:300
[sitemap.action.get-locale](/cocoon/msim/MainMenu2)
SocketListener-1/MyAction: Using locale-attribute [es]
DEBUG (2002-05-07) 14:08.33:308
[sitemap.transformer.i18n](/cocoon/msim/MainMenu2)
SocketListener-1/I18nTransformer: I18nTransformer: catalog
location:translations
DEBUG (2002-05-07) 14:08.33:311
[sitemap.transformer.i18n](/cocoon/msim/MainMenu2)
SocketListener-1/I18nTransformer: I18nTransformer: catalog
directory:file:/opt/jetty/webapps/cocoon/msim/translations/
DEBUG (2002-05-07) 14:08.33:312
[sitemap.transformer.i18n](/cocoon/msim/MainMenu2)
SocketListener-1/XMLResourceBundleFactory: XMLResourceBundleFactory
configured with: cacheAtStartup = false, directory =
'file:/opt/jetty/webapps/cocoon/msim/translations/'
DEBUG (2002-05-07) 14:08.33:313
[sitemap.transformer.i18n](/cocoon/msim/MainMenu2)
SocketListener-1/I18nTransformer: I18nTransformer: configured
DEBUG (2002-05-07) 14:08.33:315
[sitemap.transformer.i18n](/cocoon/msim/MainMenu2)
SocketListener-1/I18nTransformer: I18nTransformer: using locale en_US
DEBUG (2002-05-07) 14:08.33:316
[sitemap.transformer.i18n](/cocoon/msim/MainMenu2)
SocketListener-1/XMLResourceBundleFactory: _getBundle: messages, locale
en_US


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message