WordPress Global Translator – Language Flag Space Out
In order to provide information to people in other languages, DiceLock Security has tested different WordPress translators. After different tests, Global Translator has been choosen as our Blog Translator.
Global Translator is a great plugin that allows us to show language translations while the user remains in DiceLock Secuiryt Blog.
Once selected Global Translator showing flags with DIV layout we have found that flags are joined togheter, but there is a tip to show them in a more human readable way…
| Applies to:
WordPress 2.8 |
These customizations are provided “AS IS” without warranty of any kind and DiceLock Security disclaims all warranties, EITHER EXPRESS OR IMPLIED INCLUDING THOSE OF MERCHANTABILITY, NONINFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY, OR FITNESS FOR A PARTICULAR PURPOSE.
Upgrading or reinstalling the customized source code (package, plugin, component, …) may remove the customizations performed. |
Once activated and applied to our sidebar it looks like:
All flags in a row are close one each other, it makes difficult to distinguish them.
And at the bottom of our pages it looks like:
As in the sidebar, flags are joined, it makes difficult to distinguish them too.
If we get the file “translator.php” of Global Translator, at lines 823 – 829 we will see:
file: translator.php
lines: 823 – 829
if (HTML_BAR_TAG == 'MAP'){ $buf .=""; $map_left = $map_left+20; $map_right= $map_right+20; }else{ $buf .= "<a id='flag_$key' href='$flg_url'><img src='$flg_image_url' alt='$value flag' border='0' /></a> "; }
At line 828 we see:
<img src='$flg_image_url' alt='$value flag' border='0' /></a> ";
All we have to do is change it to:
<img src='$flg_image_url' alt='$value flag' border='0' /> </a> ";
insert one space in
border='0' /> </a>";
What we get is:
our sidebar looks like:
and the bottom looks like:
Human people will be able to clearly distinguish the flags !!!.



































