-
1. Re: Seam Locale issues
titou09 Sep 13, 2009 1:38 PM (in response to bashan)Could your problem related to JIRA-4401 ?
-
2. Re: Seam Locale issues
bashan Sep 13, 2009 8:31 PM (in response to bashan)I tried putting ConfigureListener first in web.xml with no much luck. The problems are still the same.
-
3. Re: Seam Locale issues
bashan Sep 13, 2009 10:26 PM (in response to bashan)Any ideas? Maybe there is a problem in my configuration?
-
4. Re: Seam Locale issues
tony.herstell1 Sep 14, 2009 4:31 AM (in response to bashan)As for remembering your choice of locale...
Have you added this to components.xml?
<!-- Remember the locale selected --> <international:locale-selector cookie-enabled="true"/>
-
5. Re: Seam Locale issues
bashan Sep 14, 2009 10:42 AM (in response to bashan)I added this line:
<core:locale-selector cookie-enabled="true" locale="iw"/>
Does it matter?
-
6. Re: Seam Locale issues
tony.herstell1 Sep 14, 2009 11:03 AM (in response to bashan)I always check the manual that goes with the version of seam I am using.
That may be right for your version.
Now when you re-visit your site it should remember your choice of language.
Works for me.
-
7. Re: Seam Locale issues
bashan Sep 14, 2009 1:30 PM (in response to bashan)I am running the latest version of Seam.
Is there any example project you can point me to? -
8. Re: Seam Locale issues
bashan Sep 19, 2009 12:18 AM (in response to bashan)well?? Can any anyone please help?
I am trying to make Seam International work with no luck.
When I change locale using: LocaleSelector.instance().setLocale(Locale.US)
and then restart the application, the language is not saved to cookie.
And another problem: When sending mail (with Seam mail), the language of the mail is not the same language of the LocaleSelector.Can anyone please supply an example configuration that works? I am using Seam 2.0.2 GA
-
9. Re: Seam Locale issues
bashan Sep 19, 2009 1:42 PM (in response to bashan)OK,I managed fixing the cookie thing.
It seems like the method: select() of LocaleSelector causes the Locale setting to be stored in the cookie. So when changing locale I do:
LocaleSelector.instance().setLocale(Locale.US);
LocaleSelector.instance().select();But I still have one problem, which looks like a bug in Seam:
When sending mail using Seam (using: Renderer.instance().render()), it looks like Seam uses the default Locale to send the mail, rather then the current selected Locale. This happens only if Locale was not stored in cookie yet.Does it looks like a bug?
-
10. Re: Seam Locale issues
xsalefter.xsalefter.yahoo.com Nov 15, 2009 8:52 PM (in response to bashan)Hi.. I stuck in the same problem too. Can anyone resolve this problem? I think this is a bug, because if you try to add a default locale provided by seam like fr(Franch) or de(Deutsch), It is work well.
Thanks.
-
11. Re: Seam Locale issues
fcorneli Dec 27, 2009 6:59 AM (in response to bashan)I'm having the same problem because the select() method is not invoked when doing something like:
<h:selectOneMenu value="#{localeSelector.localeString}" onchange="submit();"> <f:selectItems value="#{localeSelector.supportedLocales}" /> </h:selectOneMenu>
The auto-submit via the onchange works for the current session, but doesn't make the language persistent via the cookie. How do I invoke the select() method on the localeSelector via the onchange? I really would like to keep the onchange behaviour as it makes the language selection more natural for the user.
-
12. Re: Seam Locale issues
fcorneli Dec 27, 2009 7:28 AM (in response to bashan)The following does the trick of immediately changing the locale and at the same time persisting the locale selection via a cookie:
<h:selectOneMenu value="#{localeSelector.localeString}" onchange="submit();"> <f:selectItems value="#{localeSelector.supportedLocales}" /> <a4j:support event="onchange" action="#{localeSelector.select}" ajaxSingle="true"/> </h:selectOneMenu>
-
13. Re: Seam Locale issues
fcorneli Dec 29, 2009 7:56 AM (in response to bashan)This works as long as you're running your (SSL secured) web application on a local JBoss AS. When deploying to a remote JBoss AS it stops working. Seems like the org.jboss.seam.core.Locale cookie has the Path simply set to / and no Secure enabled, which makes Firefox to fail persisting the cookie. The org.jboss.seam.core.Locale cookie should inherent some flags from the JSESSIONID cookie I guess.