Would like to check for the language through the widget logic plugin.
Something like is_language(en). what's the conditional tag to use there? in gengo it was is_language what is it in qtranslate?
<?php if (qtrans_getLanguage() == 'en') {echo 'current page?lang=cy';}elseif (qtrans_getLanguage() == 'cy') {echo 'current_page?lang=en';} ?><?php if (qtrans_getLanguage() == 'en') {echo '<a href="' . '<?php bloginfo('url'); ?>' . '/?lang=cy" title="Cymraeg">Cymraeg</a>';}elseif (qtrans_getLanguage() == 'cy') {echo '<a href="' . ' <?php bloginfo('url'); ?>' . '/?lang=en" title="English">English</a>';} ?><?php
if(qtrans_getLanguage() == "en")
echo ('<a href="http://www.englishwebsite.com">TITLE</a>');
else if(qtrans_getLanguage() == "fr")
echo ('<a href="http://www.sitewebfrancais.com">TITRE</a>');
?><?php
_e('<!--:en--><a href="http://www.englishwebsite.com">TITLE</a><!--:--><!--:fr--><a href="http://www.sitewebfrancais.com">TITRE</a><!--:-->');
?><?php echo '<a href="' . qtrans_convertURL('http://mywebsite.com/post') . '">TITLE</a>'; ?><?php echo '<a href="' . qtrans_convertURL(get_option('home')) . '">' . __('Home') . '</a>'; ?><?php qtrans_generateLanguageSelectCode('dropdown'); ?>
Note: you can replace 'dropdown' with 'image', 'text', or 'both'<?php
// lot of code before hand
if(!empty($row["link"])) {
$linkP = '
<div class="discogPanel">
<h3><a href="'.$row["link"].'" target="_blank">Website</a></h3>
</div>
';
}
// Quite a bit of code after this text
if(!empty($row["link"])) {
$linkP = (__('<!--:en-->Website<!--:--><!--:cy-->Wefan<!--:-->'));
$linkP = '
<div class="discogPanel">
<h3><a href="'.$row["link"].'" target="_blank">'.$linkP.'</a></h3>
</div>
';
}Return to qTranslate Support Forum
Users browsing this forum: No registered users and 7 guests