Support » Plugins and Hacks » [Resolved] [Plugin: qTranslate] Page Title

[Resolved] [Plugin: qTranslate] Page Title

  • Hi,
    I have a problem with qTranslate. The title of each page is displayed in English and German. For example a title of one page is “About us”, but you can see “About usÜber uns”

    I tried <!–:de–>Über uns<!–:–><!–:en–>About us<!–:–>
    and [:de]Über uns[:en]About us

    I think it depends on the theme but I don´t know how to fix it.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Hey,

    You need to use “qtrans_use” function to display the post title as per current language.

    You can use the following code to display correct post title –

    <?php echo qtrans_use($q_config['language'], $post->post_title, true);?>

    Example link – http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=2

    Hope this will help you!

    Yes that helped me a lot. Thank you very much.

    Yo welcome 🙂

    <?php echo qtrans_use($q_config['language'], $post->post_title, true);?>

    If I want to call the meta title post, from the “Qtranslate meta”, how can I do ?
    thanks to help me

    I think you can try this:

    First of all, get the meta data in to separate variable:

    $post_meta = get_post_meta($post->ID, 'meta_key', true)

    and then, you can translate it as we did:

    <?php echo qtrans_use($q_config['language'], $post_meta, true);?>

    Hope this will help you!

    Ok ! perfect, I try it.
    Thanks a lot !

    @Huteshanjara: Please i read your great solution, but i don’t have any ideas where place the code. My site (under construction) are http://www.boscaro.info and theme directory are boscaro2 . If you have a bit of time for me you are wellcome!

    Thanks in advance.

    okay, how can i contact you?

    Can I contact you from your site: http://www.boscaro.info/en/contatti/

    let me know that what will be best to discuss it.

    Hitesh Anjara

    I am having the same problem let me know in which file we have to change.


    hi hiteshanjara,
    i am new to wordpress as well as qTranslate. i read your solution for translating the post title, but still i dont know where do i need to add those code. Can you please help me. Thanks in advance

    Hi, can u plz give your installed wordpress version?

    hi hiteshanjara,

    i am using wordpress version 3.5.1


    You just need to find the “content-page.php” in your theme folder.

    For. E.g: “/wp-content/themes/YOUR_THEME_FOLDER/content-page.php”

    In this file, you can find the_title(); replace this code with:

    global $post;
    echo qtrans_use($q_config['language'], $post->post_title, true);

    as per my above comments.

    I hope this will work in your theme, let me know if you will face any issue on the same.

    dude thanks a lot for your help.now i have added the code to the wp-content/themes/YOUR_THEME_FOLDER/content-page.php .but my doubt is if we add new posts or page,in the admin view of wordpress the every new page or posts title should be shown in the laguages which i have included na…(i included simplified chinese,traditional chinese,english)

    pleas check the image below

    (in that image you could find that title for traditional and simplified chinese is null)

    😉 You should need to enter the translated text there.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Resolved] [Plugin: qTranslate] Page Title’ is closed to new replies.