• Resolved m4j4

    (@m4j4)


    Hi,

    I have a WordPress site and I’m using qTranslate-X.
    I have two languages (English and Deutsch).
    I’m on the page titled Map (in English) and Landkarte (in Deutsch).
    Site title is Jane Roe.

    In head the title is written like this:

    <title><?php wp_title( '|', true, 'right' ); ?></title>

    and displays like this in the browser’s toolbar like this:

    MapLandkarte - Jane Roe

    This is not okay because it displays the page title in English (Map) as well as in Deutsch (Landkarte).

    So what should I do to make it display like this (if I’m on English site):

    Map - Jane Roe

    and like this if I’m on Deutsch site:

    Landkarte - Jane Roe

    Thanks if you can help.

    https://www.ads-software.com/plugins/qtranslate-x/

Viewing 15 replies - 1 through 15 (of 32 total)
  • Plugin Author Gunu

    (@grafcom)

    @m4j4

    maybe Qtranslate Slug see here

    Success

    Thread Starter m4j4

    (@m4j4)

    Thanks, @gunu,
    But I still hope someone will show me how to do it directly with qTranslate X
    If the_content() detects language than I do not see the why wp_title wouldn’t. I don’t know…

    Plugin Author Gunu

    (@grafcom)

    @m4j4

    You talk about

    Permalink: https://www.yoursite.com/en/name of the page/

    right?
    (see under the page title in the different languages when you edit a page)

    Thread Starter m4j4

    (@m4j4)

    @gunu

    No, not about that.

    I’m talking about the title tag. Its the text that it is displayed in the browser tab – the short text that it is displayed after the favicon.

    You control this text via

    <title></title>

    inside

    <head></head>

    You know what I mean?

    Plugin Author Gunu

    (@grafcom)

    @m4j4,

    what other plugins do you use and what theme?

    Something from premium.wpmudev.org?

    Plugin Author Gunu

    (@grafcom)

    @m4j4,

    do you use the latest test version of qTranslate X ?
    download here

    Thread Starter m4j4

    (@m4j4)

    I use:

    • Cookie Notice
    • Custom Meta Widget
    • Custom Post Type UI
    • Dynamic Widgets
    • Google Analytics by Yoast
    • qTranslate-X
    • Super Simple Contact Form
    • WordPress SEO
    • WP Lightbox 2
    • WP Media Cleaner

    I don’t think there is anything from premium.wpmudev.org. Why?

    Plugin Author John Clause

    (@johnclause)

    Do you have this problem if other plugins are off?

    Thread Starter m4j4

    (@m4j4)

    To test the functionality of <title></title> tag I’ve installed a brand new WP website. And Yes with no plugins and with twentyfifteen theme it works fine.

    But I need it in the framework of my project where all those plugins are necessary…

    Another interesting think I’ve noticed at my actual site (have a look at it here) is that <title> of custom post types displays correctly. For example here the <title> is not bilingual – which is okay.

    But on regular pages (post type = page) the <title> is bilingual. Have a look at this subside example.

    Plugin Author John Clause

    (@johnclause)

    First you need to figure out the plugin in conflict, by turning them on/off and trying one by one. It may not be plugin, but the theme. I am afraid that the code of the theme will need to be adjusted. Would you be able to find the place at fault in the code? See if there is a filter we can enable, if not contact the theme/plugin to make the changes.

    Thread Starter m4j4

    (@m4j4)

    Hi, John,
    Thanks for the answer.

    The plugin in conflict is WordPress SEO.
    If I turn it of the <title> tag is okay.

    Is there anything you can suggest to do to fix this?

    Plugin Author John Clause

    (@johnclause)

    @m4j4: That is good, that you found it out. Is it: https://www.ads-software.com/plugins/wordpress-seo/ ? Its exact name “WordPress SEO by Yoast”, please confirm. It is good to refer plugins by a link to be unambiguous.

    There is an option “Custom Filters”, where you can put filter name to be passed through the translation. It is very likely that “WordPress SEO by Yoast” has apply_filters in place to alter the title. If we find one, then simply putting its name into “Custom Filters” will solve the problem. Would you be interested to perform this search in their code?

    Thread Starter m4j4

    (@m4j4)

    Yes off course I’m interested to perform this search in their code.

    And yes, I confirm, it is a https://www.ads-software.com/plugins/wordpress-seo/

    So what should I do/check? I can do it either in the Dashboard or inside the code. I’m more or less familiar with both.

    Thank you.

    Plugin Author John Clause

    (@johnclause)

    It is up to you, use the tools you know the best. I normally use grep on file system and then put some debugging messages in the code, if needed, for a simple enough task, before enabling a full debugging framework on a copy of the site on local server.

    Thread Starter m4j4

    (@m4j4)

    Okay. But what do I need to do?

    If I got it right I need to find something in the WordPress SEO plugin code? But what? apply_filters? Could you please explain?

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘How to make title tag translatable?’ is closed to new replies.