WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
How to use this plugin at Widget Title? (7 posts)

  1. devilcerkez
    Member
    Posted 1 year ago #

    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

    http://wordpress.org/extend/plugins/qtranslate/

  2. iamchris
    Member
    Posted 1 year ago #

    <?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!

  3. devilcerkez
    Member
    Posted 1 year ago #

    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

  4. iamchris
    Member
    Posted 1 year ago #

    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

  5. devilcerkez
    Member
    Posted 1 year ago #

    I tried but it could not work :(

    You can see left side

    http://www.prosammuhendislik.com.tr

  6. iamchris
    Member
    Posted 1 year ago #

    <?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!

  7. devilcerkez
    Member
    Posted 1 year ago #

    Dear Chis,

    I could not find where I must change. :(

    Edit Language
    Language Code

    2-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)

    Name

    The 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 Format

    Depending 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 Format

    Depending 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 Message

    Message 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic