Alle domenica 28 ottobre 2012, Andrea Del Bene ha scritto:
> You should try Session.get().getLocale(). By default Session returns the 
> locale of the underlying HttpServletRequest.

getLocale return the languange set in the browser, and it is not the same thing 
of country.

You are right for example for me that I am italian, so my language (it) is the 
same of the country (it)

But for example if your country may be Brazil (br), but language is portuguese.

The same is for language espanol (es), that is speaking in many countries.




> > How can I know the country of the user that is connected to my wicket page?
> >
> > I only suppose to check the IP address with:
> >
> > String ipAddress = ((ServletWebRequest) 
> > RequestCycle.get().getRequest()).getContainerRequest().getRemoteHost();
> >
> > And than with command line whois check the country
> >
> > whois 109.113.243.xx |grep -E 'country|Country'
> >
> > or use a free database:
> >
> > http://dev.maxmind.com/geoip/geolite.
> >
> > If you know some wicket library, or better way, please tell me.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to