Re: How to get user's country and language with cakePHP
As an alternative to the webservice you can also use the apache api version. The geoip_country version works quite well. On 14 nov, 22:15, euromark dereurom...@googlemail.com wrote: for the country you can use RequestHandlerComponent::getClientIP() in combination with sth likehttp://planetcakephp.org/aggregator/items/3841-cakephp-requesthandler... for the language simply use the $_SERVER['HTTP_ACCEPT_LANGUAGE'] string in my case for example: [HTTP_ACCEPT_LANGUAGE] = de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4 the first one is usually the language the user expects (0.8 is the closest to 1) On 14 Nov., 21:31, Mariano C. mariano.calan...@gmail.com wrote: Is there a way (helpers, components) to obtain with Cake PHP the user's country and associated language for that country? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How to get user's country and language with cakePHP
Is there a way (helpers, components) to obtain with Cake PHP the user's country and associated language for that country? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to get user's country and language with cakePHP
for the country you can use RequestHandlerComponent::getClientIP() in combination with sth like http://planetcakephp.org/aggregator/items/3841-cakephp-requesthandler-extended for the language simply use the $_SERVER['HTTP_ACCEPT_LANGUAGE'] string in my case for example: [HTTP_ACCEPT_LANGUAGE] = de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4 the first one is usually the language the user expects (0.8 is the closest to 1) On 14 Nov., 21:31, Mariano C. mariano.calan...@gmail.com wrote: Is there a way (helpers, components) to obtain with Cake PHP the user's country and associated language for that country? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en