I have a drupal site using gtranslate, and when I switch to english language, the language selection block has the following problems:
- Language links exists in html links are not shown correctly (now appears blank.png image).
- In the english language link, the link has href attribute pointing to a undesired site, http://www.jnmastore.com" rel="nofollow" target="_blank .
The html original markup in the page before translating is :
- Code: Select all
<div id="gtranslate">
<script type="text/javascript">
function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;var lang=lang_pair.split('|')[1];var plang=location.pathname.split('/')[1];if(plang.length !=2 && plang != 'zh-CN' && plang != 'zh-TW')plang='es';if(lang == 'es')location.href='/'.replace('/'+plang+'/', '/');else location.href='/'+lang+'/'.replace('/'+plang+'/', '/');}
</script><style type="text/css"></style><a href="javascript:doGTranslate('es|es')" title="Spanish" class="gtflag lang-selected" style="font-size:24px;padding:1px 0;background-repeat:no-repeat;background-position:-600px -200px;">ES</a> <a href="javascript:doGTranslate('es|en')" title="English" class="gtflag" style="font-size:24px;padding:1px 0;background-repeat:no-repeat;background-position:-0px -0px;">EN</a></div>
The html markup after translating is:
- Code: Select all
<div id="gtranslate">
<script type="text/javascript">
function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;var lang=lang_pair.split('|')[1];var plang=location.pathname.split('/')[1];if(plang.length !=2 && plang != 'zh-CN' && plang != 'zh-TW')plang='es';if(lang == 'es')location.href='/'.replace('/'+plang+'/', '/');else location.href='/'+lang+'/'.replace('/'+plang+'/', '/');}
</script><style type="text/css"></style><a href="javascript:doGTranslate('es|es')" title="spanish" class="gtflag" style="font-size:24px;padding:1px 0;background-repeat:no-repeat;background-position:-600px -200px;"><img src="http://origin_yokrnlncpn.comunidad.madrid/sites/all/modules/contrib/gtranslate/gtranslate-files/blank.png" height="24" width="24" style="border:0;vertical-align:top;" alt="spanish"></a> <a href="javascript:doGTranslate('es|en')" title="<a href="http://www.jnmastore.com/">العربية</a>" class="gtflag" style="font-size:24px;padding:1px 0;background-repeat:no-repeat;background-position:-0px -0px;"><img src="http://origin_yokrnlncpn.comunidad.madrid/sites/all/modules/contrib/gtranslate/gtranslate-files/blank.png" height="24" width="24" style="border:0;vertical-align:top;" alt="<a href="http://www.jnmastore.com/">العربية</a>"></a></div>
Searching this url in google I am seeing another websites having a Gtranslate block (non-drupal) has the same href atttribute pointing to http://www.jnmastore.com" rel="nofollow" target="_blank when pages are translated:
- http://f-cosmetics.es/en/" rel="nofollow" target="_blank
- http://en.cherubina.com/" rel="nofollow" target="_blank
I don't want this url because the website is a government website and is not related with this page. This also generates a problem: this link can be found in a search engine like http://www.google.com" rel="nofollow" target="_blank and, as I said before, the page must not be related with the link.
How can we have the correct images and markup?