How to use this plugin at Widget Title?
-
Dear Guys,
I am using qtranslate. I have little problem. I can use this tag
<!–:en–>A product<!–:–><!–:tr–>A Ürünü<!–:–>
But I could not use at Widget Title. It is seem “A productAürünü”
How to solve widget title problem?
Thank you
-
<?php
if( qtrans_getLanguage() == ‘en’ ){ ?>
Choose Language
<?php }else { ?>
Danke
<?php } ?>This may help! Put this inside your template if you want the option of two outputs!
Dear Chris,
How to use your code? I tried with Widget Title. I saw “Choose Language Danke” when I refreshed.
Or I must add any .php file?Thank you
You can do this in your php file as a work around so ie…
<h1><?php
if( qtrans_getLanguage() == ‘en’ ){ ?>
Thank you
<?php }else { ?>
Danke
<?php } ?>
</h1>Place this were you have your title.
Or if via the widget do this in the title box
[:en]Thank you[:GER]Danke
<?php if(qtrans_getLanguage() == “en”)
echo (‘Thank You’);
else if(qtrans_getLanguage() == “GER”)
echo (‘Danke’);
?>Also make sure your language code matches that of the qtranslate plugin, this will be in
Settings > Lanuages > Languages Table > Select your language here ie Francais > Edit > Lanugage code . So if you have to translate french your code would be
<?php if(qtrans_getLanguage() == “en”)
echo (‘Thank You’);
else if(qtrans_getLanguage() == “fr”)
echo (‘merci’);
?>Make sure within the plugin you have English and French enabled under General settings!
Dear Chis,
I could not find where I must change. 🙁
Edit Language
Language Code2-Letter ISO Language Code for the Language you want to insert. (Example: en)
Flag Incorrect Flag Image Path! Please correct it!
Choose the corresponding country flag for language. (Example: gb.png)
NameThe Name of the language, which will be displayed on the site. (Example: English)
Locale
PHP and WordPress Locale for the language. (Example: en_US)
You will need to install the .mo file for this language.
Date FormatDepending on your Date / Time Conversion Mode, you can either enter a strftime (use %q for day suffix (st,nd,rd,th)) or date format. This field is optional. (Example: %A %B %e%q, %Y)
Time FormatDepending on your Date / Time Conversion Mode, you can either enter a strftime or date format. This field is optional. (Example: %I:%M %p)
Not Available MessageMessage to display if post is not available in the requested language. (Example: Sorry, this entry is only available in %LANG:, : and %.)
%LANG:<normal_seperator>:<last_seperator>% generates a list of languages seperated by <normal_seperator> except for the last one, where <last_seperator> will be used instead.
- The topic ‘How to use this plugin at Widget Title?’ is closed to new replies.