WordPress.org

Ready to get started?Download WordPress

Forums

Ajaxy Live Search
qTranslate & Ajaxy interaction (3 posts)

  1. Dan
    Member
    Posted 2 years ago #

    Hello,

    This is an unbelievable plugin, u're a genius.
    I use qTranslate on my multilanguage site (at present I have 2 languages: french and ukrainian)

    when typing something like "cours" in my Ajaxy search field, it returns both post titles glued together, smth like "Bureau des coursВідділ курсів" (imagine what it would return if I had suppose 10 languages! Maybe I will gradually achieve that =) ...)

    Normally qTranslate delimits the titles as follows (though I'm not 100% sure of it but I found these delimiters in my menu configuration)
    <!--:fr-->Présentation<!--:--><!--:uk-->Презентація<!--:-->

    I think it's feasible and in theory I see how to correct:
    1. I get to know the current language
    <?php echo qtrans_getLanguage(); ?>
    2. I must do some RegExp test which would ignore all text snaps but the one corresponding to the current language + strip all useless characters (<!--:-->).
    3. And I make it return the title only (in current language).

    Unfortunately I'm not good at PHP Regular expressions to do that at my own.

    Any suggestions guys?

    http://wordpress.org/extend/plugins/ajaxy-search-form/

  2. n-for-all
    Member
    Plugin Author

    Posted 2 years ago #

    u don't have to do any regexp, qtranslate must have her own functions to return the correct title for the current language, i will check it out and return back to you

  3. Milos Milikic
    Member
    Posted 1 year ago #

    Have the same problem here. Search result displays both language titles. Any solution?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic