December 2014
S M T W T F S
« Nov    
 123456
78910111213
14151617181920
21222324252627
28293031  

Recent Posts

WordPress Global Translator – Language Flag Space Out

Sidebar Joined Translator
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
Global Translator 1.2.3

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:

Bottom Joined Translator

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 .= "$value flag ";
    }

At line 828 we see:

$value flag ";

All we have to do is change it to:

$value flag  ";

insert one space in

border='0' /> ";

What we get is:

our sidebar looks like:

Sidebar Spaced Translator

and the bottom looks like:

Bottom Sidebar Translator

Human people will be able to clearly distinguish the flags !!!.

55 comments to WordPress Global Translator – Language Flag Space Out

Leave a Reply