Thanks Tim, we're looking forward to your detail reply! :)
Cheers, Neil On Nov 10, 4:40 pm, Timothy Perrett <timo...@getintheloop.eu> wrote: > Don't call Locale.setDefault - that is a global configuration for the > JVM > > I would urge you to re-read my article -in it you'll see how I take a > note of the requested locale, and then hold that in a cookie for later > reference or use on a future visit. Study the locale calculator > carefully - there has been a breaking API change since it was written, > but with a slight modification it will work fine. > > Moreover, ISO country codes are in the format en_US, not en_us... Lift > is leveraging some base java localization and you have to stick to the > rules :-) > > I'll try to reply in more detail later. > > Cheers, Tim > > Sent from my iPhone > > On 10 Nov 2009, at 08:19, "Neil.Lv" <anim...@gmail.com> wrote: > > > > > Maybe the Locale.setDefault(iLocale) method's scope is the whole > > website not for the single user ? > > > Cheers, > > Neil > > > On Nov 10, 4:16 pm, "Neil.Lv" <anim...@gmail.com> wrote: > >> yk, > > >> But if only one person change the language ( to ms_MY). > > >> Then the other users of the website will also see the page as ms_MY > >> language not the default language en_US. > > >> I test in my computer it will affect the other browsers. > > >> So... > > >> Cheers, > >> Neil > > >> On Nov 10, 3:16 pm, YING-KWANG TU <ying.kwang...@gmail.com> wrote: > > >>> Neil, > > >>> In my Boot.scala: > > >>> def localeCalculator(request : Box[HTTPRequest]): Locale = > >>> request.flatMap( > >>> _.param("locale") match { > >>> case Nil => Full(Locale.getDefault()) > >>> case myLocale :: _ => { > >>> def iLocale = new Locale(myLocale.substring(0, 2), > >>> myLocale.substring(3, 5)) > >>> Locale.setDefault(iLocale) *// this is where I set the > >>> default > >>> locale to the new one* --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---