cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Schneider" <volker.schnei...@danet.de>
Subject RE: Set locale with an action
Date Tue, 07 May 2002 20:44:42 GMT
Hi,

I have tried this as you did and Konstantin P. told me, that this doesn't
work, but he made an update to i18n to make it work. But this is in the CVS
head, not in Cocoon 2.0.2 release.

Until then you have to use the request parameter "locale=en" for example.

Best regards
- Volker -

-----Original Message-----
From: Spectron International, Inc. [mailto:spectron@coqui.net]
Sent: Dienstag, 7. Mai 2002 20:35
To: cocoon-users@xml.apache.org
Subject: Set locale with an action


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>


---------------------------------------------------------------------
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