For example, the word 'site' exists in both French and English, but no definition is available in French. I think it comes from the fetching url:
https://www.google.com/search?hl=${lang}&q=define+${word.replace(/·/g, '')}&gl=${countryCode}
In this url, the word 'define' is in English. If you add some code to the 'background.js' file, as you did for the Hindi language:
11
For example, the word 'site' exists in both French and English, but no definition is available in French. I think it comes from the fetching url: https://www.google.com/search?hl=${lang}&q=define+${word.replace(/·/g, '')}&gl=${countryCode} In this url, the word 'define' is in English. If you add some code to the 'background.js' file, as you did for the Hindi language:
if (lang == "fr"){ return url = https://www.google.com/search?hl=${lang}&q=définir+${word.replace(/·/g, '')}&gl=${countryCode}; }
the French definition of the word site is then found. I think this addition should be made for all supported languages (en, fr, de, es, pt, pt-br).