Commit 9754bd61 authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

Merge branch 'fix-language-selection' into 'master'

fix language selection in google engine

See merge request e/cloud/my-spot!107
parents b02086f7 1ef906b6
......@@ -181,7 +181,12 @@ def get_lang_info(params, lang_list, custom_aliases, supported_any_language):
# https://developers.google.com/custom-search/docs/xml_results#lrsp
# Language Collection Values:
# https://developers.google.com/custom-search/docs/xml_results_appendices#languageCollections
ret_val['params']['lr'] = "lang_" + lang_country if lang_country in lang_list else language
if lang_country in lang_list:
ret_val['params']['lr'] = "lang_" + lang_country
elif language in lang_country:
ret_val['params']['lr'] = "lang_" + language
else:
ret_val['params']['lr'] = language
ret_val['params']['hl'] = lang_country if lang_country in lang_list else language
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment