If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Google website translate with custom icons

Google offers a drop-down menu where you choose the language you wish to translate to (http://translate.google.com/translate_tools).
What I want is that same menu displayed as small flag icons users would click on to get the translated version.
I have found this on the web: http://stackoverflow.com/questions/1...tom-flag-icons and encountered several problems. First of, the href attribute of the anchor tag is '#', which instead of doing nothing, for some reason scrolls to the bottom of the site when linked to. To avoid that, I edited the html code into this:

So, I've got a website in Croatian (hr) and need it to be translatable into English (en), German (de) and Italian (it). The code above is completely working in Chrome, but fails to do anything in Mozilla or IE. The drop-down menu is functional in all browsers. I need this fixed!

Also, I discovered an interesting problem when translating from a translated version back to the language the site is in. In order to do so, we need to add Croatian in the includedLanguages, like so:

On the first page load, the drop-down menu offers a choice of only three languages, with the 'Select language' label in place of the default language. When clicking on any language, the 'Select language' label switches to Croatian (which is obviously the default language), so there are four languages to choose from now. However, when selecting Croatian now that it's available, it actually gives a false translation (possibly translating the last selected language into Croatian instead of not translating anything and simply displaying the original. It is possible that the original is being treated as English and then translated into the language of the original, because 'slike' in Croatian gets translated into 'takav' which means 'like' in English). Also, when translating from the 'false' Croatian translation into any other language, it switches the 'false' into the 'real' translation first, giving the same choice you get on first page load (therefore, two clicks are required to get the wanted translation). It is possible there are no such issues when English is set as the default language, but since the Google translation toolbar offers a fairly visible 'Show original' button, I can live without the Croatian flag and this is a minor problem, I only need the code to work in all major browsers.

I understand there was no response for this, but in case somebody ever runs into it, I've found a way around this method. If '#googtrans/pagelang/targetlang' is added on the end of the url and the page is refreshed, it will get translated. So I've made links such as this: