Fix/Change Firefox Google search default language

by Piotr Krzyzek on October 2, 2008

Traveling out of your native country and using google? Trying to get Firefox’s Google search to use your language but it’s not complying? Let me tell you this, normal Firefox setting AND Google settings WILL NOT WORK.

If you search on Google on how to set the language, it’ll tell you. But it’s not what we are searching for and it doesn’t work with the Google search in Firefox. So how do we fix this? Simple actually, first locate a file called “google.xml” in a folder named searchplugins.

You might have a few versions of this file, so it might be a good idea to edit all of them. For me the file was:

/usr/lib/firefox-addons/searchplugins/google.xml

In this file you will see a xml section of lines by the name of “Param”. It will look something like this:

<Param name=”q” value=”{searchTerms}”/>
<Param name=”ie” value=”utf-8″/>
<Param name=”oe” value=”utf-8″/>
<Param name=”aq” value=”t”/>

Add the folling line in there. A good place would be right above the utf-8.

<Param name=”hl” value=”en”/>

So, your final product should look something like:

<Param name=”q” value=”{searchTerms}”/>
<Param name=”hl” value=”en”/>
<Param name=”ie” value=”utf-8″/>
<Param name=”oe” value=”utf-8″/>
<Param name=”aq” value=”t”/>

Of course, if you do not want English … use something other than “en”. Google for the correct value. :-)

Quick recap (and more jump) after the jump with linux commands to get it done.

  • Find “google.xml”.
    • > locate google.xml
  • Edit the file (you’ll need root permissions for this).
    • > sudo vim /usr/lib/firefox-addons/searchplugins/google.xml
    • You can also use “kate” or your favorite editor. ViM just happens to be mine. In KDE, you can probably do something like the below to open up kate as root:
      • > kdesu kate /usr/lib/firefox-addons/searchplugins/google.xml
  • Save the file.
  • Restart Firefox.
  • Rinse and repeat if the file you edited didn’t do the trick.

You can find a list of language codes here (“pl” for Polish, “ja” for Japanese, ect ….). Just in case the link doesn’t work, this just googling “Google Language codes” or try this full link (same as before but just spelled out for ya): http://www.google.com/apis/adwords/developer/adwords_api_languages.html

Related posts:

  1. Basic Firefox addons/extentions
  2. Firefox 3 beta 5 isn’t all that hot …
  3. Firefox 64 + Flash 9 working!
  4. Yahoo Joins Google’s OpenSocial Platform

{ 1 comment… read it below or add one }

Norbert October 2, 2008 at 7:09 am

Actually, there are two separate issues:

- hl= is your web interface language code
- lr= is your search language code

I think lr= will default to your hl= if not explicitly provided, but if you’re still having issues you may want to set both appropriately. For english, that would be:

hl=en
lr=lang_en

Incidently, mixing and matching language interfaces and search results may induce some pretty funny pranks. For example, russian search results for “bride” with an arabic interface.

And on that subject, you may not know but there are several far more interesting interface languages (hl=):

hl=xx-klingon
hl=xx-hacker
hl=xx-piglatin
hl=xx-pirate

In case your wondering, this is precisely why google is the #1 search engine for people who know better :-)

Reply

Leave a Comment

CommentLuv Enabled

Previous post:

Next post: