How To Display Links Only In Translator Plugin Pro
September 3rd, 2007 by Angsuman Chakraborty§ Translator Contents
Translator Plugin Pro for WordPress blogs provides automatic machine translation of your blog in 14 languages* - English, German, Spanish, Russian, Arabic, Dutch, Swedish, Greek, French, Italian, Portuguese, Japanese, Korean, Chinese Simplified and Chinese Traditional. It is fully customizable with PHP API & tags. One of the frequent requests is how we can provide only links to translated pages without the associated country flag images. Here’s is a full example how you can easily do it with the API. Please include the following code in your template to use it.
<!--skip translation-->
<?php
if(function_exists('tgGetVisibleLanguages')) { // This ensures that the Translator plugin is active.
$visibleLanguages = tgGetVisibleLanguages();
echo '<ul>';
foreach($visibleLanguages as $language) {
echo "<li><a href='" . tgGetTranslatedPageURL($language) . "' title='" . tgGetTooltip($language) . "'>" . tgGetTooltip($language). "</a></li>";
}
echo '</ul>';
}
?>
<!--end skip translation-->
Feel free to customize the code to your needs. Let me know if you have any questions. You can find the full details about the API here.
*Note: Translator Gold provides translation in 32 different languages.
Tags: Headline News, How To, PHP, Pro Blogging, Programming, SEO, Tech Note, Translator Plugin Pro, Web, Web 2.0, Web Services, WordPress, WordPress Plugin | | RSS 2.0 | Trackback this Article | Email this Article










































Add to Technorati Favorites
