Skip to content

Instantly share code, notes, and snippets.

@cacheleocode
Created June 24, 2015 19:53
Show Gist options
  • Save cacheleocode/6330f38922e0ae16dee3 to your computer and use it in GitHub Desktop.
Save cacheleocode/6330f38922e0ae16dee3 to your computer and use it in GitHub Desktop.
localized search
<div id="cse">Loading</div>
<script src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('search', '1', {
language : 'es'
});
google.setOnLoadCallback(function(){
var customSearchControl = new google.search.CustomSearchControl('013306181249278908565:ukfvu-kg-zk');
var options = new google.search.DrawOptions();
options.setAutoComplete(true);
options.enableSearchboxOnly('/es/search/');
customSearchControl.draw('cse', options);
}, true);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment