I am using BazingaGeocoderBundle in reverse geocoding the (X,Y) coordinates. Since, my website is bilingual, I do need to make reverse geocoding twice.
Unfortunately, the configuration of BazingaGeocoderBundle allows you to set only one locale as it is seen in the code below. So, I am wondering if it is possible to set the
locale while coding (not in the config.yml)?
Best How To :
It's possible to make translation with the library by setting the locale as shown here.
This is an example code for that:
$geocoder = new \Geocoder\Geocoder();
$adapter = new \Geocoder\HttpAdapter\CurlHttpAdapter();
$chain = new \Geocoder\Provider\ChainProvider(array(
new \Geocoder\Provider\GoogleMapsProvider($adapter, 'fr_FR'),
$result = $geocoder->reverse(48.79084170157100,2.42479377175290);
Hope it will help others ;)