This content has been marked as final. 
    
Show                 4 replies
    
- 
        1. Re: Changing Locale in Seam?rmemoria Feb 28, 2007 6:54 PM (in response to tonylmai)Don't use the JSF context. Instead inject the component localeSelector like that: 
 @In Locale localeSelector;
 ..
 ..
 ..
 localeSelector.setLocale(Locale.ENGLISH);
 ..
 ..
 It shall work,
 regards,
 Ricardo
- 
        2. Re: Changing Locale in Seam?rmemoria Feb 28, 2007 8:22 PM (in response to tonylmai)oooppps, my mistake... use this: 
 Inject
 @In LocaleSelector localeSelector;
 ..
 set the language
 localeSelector.setLanguage("en");
- 
        3. Re: Changing Locale in Seam?tonylmai Feb 28, 2007 8:26 PM (in response to tonylmai)Seam does make it simpler doesn't it. ;-) 
 Coded it. Will test it out as soon as I complete this half baked module that I've been working on all afternoon. 8(
 Thank Ricardo.
- 
        4. Re: Changing Locale in Seam?tonylmai Feb 28, 2007 8:30 PM (in response to tonylmai)I replied before I saw your second posting. 
 I like your first code snippet better. That way I can control time and other stuffs. I figured you meant injecting a LocaleSelector so that what I did.
 Here is how I coded it.@In LocaleSelector localeSelector; public String englishAction() { localeSelector.setLocale(java.util.Locale.ENGLISH); return NavigationRuleNames.DISPLAY_SAME_PAGE; }
 Thanks
 
    