Back to list of all filter and action hooks for Google Address Autocomplete.
Description #
Override the Google Places API language setting.
Parameters #
$language_code
(string) The language code for Google Places API responses. Set to an empty string to let the script decide the language based on the user’s device. See accepted languages in the Places API documentation.
Examples #
/**
* This will force Brazilian Portuguese for Google Places API
*/
function fcgaa_set_language_to_ptbr( $language_code ) {
// Force Brazilian Portuguese
return 'pt-BR';
}
add_filter( 'fc_gaa_google_places_api_language', 'fcgaa_set_language_to_ptbr', 10 );