WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
query for page-title always orders posts by default language (3 posts)

  1. bender2601
    Member
    Posted 2 years ago #

    Hi, I am using translate for a long time already but I've never encountered this problem so far:

    I have 2 languages - GERMAN and ENGLISH whereas german is the default language

    I have some posts that show information about distributor-companies in certain countries - the page-title is always the country name (and they are all in the category with ID "14")

    Here's an example list of german page-titles (and the english translation in brackets)

    Deutschland (Germany)
    Kroatien (Croatia)
    Ungarn (Hungary)
    Frankreich (France)
    ......

    I use the following code to query for these pages:

    query_posts( 'cat=14&orderby=title&order=ASC' );

    If the qtranslate-language is german then the result is as follows:

    Deutschland, Frankreich, Kroatien, Ungarn (which is the correct order)

    If the qtranslate-language is english unfortunately the result is the same as above - although it should be as follows:

    Croatia, France, Germany, Hungary

    Actually I think this should be the standard way of handling it - but it seems it isn't.

    Anybody having the same issue?

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

  2. zelkovawebstudio
    Member
    Posted 1 year ago #

    I have exactly the same problem.

    I've got a website where I order post-types (hotels) by title, but sometimes the hotel name can be translated, so when I visit the web in spanish, it orders by the default language (spanish), but if I visit the site in english, it still orders the hotels by the default language.
    So a Hotel starting with "C" in english is shown on the first place if in spanish starts with an "A".

    I thought to make a custom wordpress query filtering the title field looking for <!--:current_lang--> and ordering it by that result, but I also need to combine it with some taxonomies and then the query starts to need so much other data, so much difficult to obtain (crossing tables, etc.)

    Please we need some help on that, it's really a mess, and I've got +2000 posts already published.

    Thanks to everyone for your efford!

  3. dham84
    Member
    Posted 1 year ago #

    Were you guys able to resolve this issue?
    I'm having the exact same problem and urgently need to fix it for a client =(
    Any ideas?

    Thanks a lot in advance!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic