WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
[resolved] Content Doesn't Show Up with Language Detection (4 posts)

  1. Angela
    Member
    Posted 2 years ago #

    I'm using a form plugin, and a script that will be generating some inputs for the form. Unfortunately, the script doesn't recognize any language settings, and the only thing I could do is to configure the link in that script (this link points to that form generated by the form plugin) to follow the default language path (which is english).
    I was expecting to use a shortcode function to detect current page's language setting, but somehow, when I view the page, there is no output at all. This is the content of the shortcode function:

    if(qtrans_getLanguage() == 'en' OR 'EN') {
       do_shortcode('[gravityform id=1 name="Hosting Plan Purchase" title=false description=false ajax=true]');
    } else if (qtrans_getLanguage() == 'zh' OR 'ZH') {
       do_shortcode('[gravityform id=5 name="网站托管套餐" title=false description=false ajax=true]');
    }

    Angela

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

  2. Angela
    Member
    Posted 2 years ago #

    Some tips? This is suppose to be a very simple tweak.

  3. Angela
    Member
    Posted 2 years ago #

    I have googled for this for hours, and the same set of functions show up everywhere. But it's NOT working when I plugin it into the PHP or JS file (yes, I did include the <?php ?>). What's wrong with my code?

  4. Angela
    Member
    Posted 2 years ago #

    Sigh, don't bother. Guess I'd just have to do it the old school way, match the URI...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags