Title: Conditional statements not working
Last modified: August 22, 2016

---

# Conditional statements not working

 *  Resolved [gab1982](https://wordpress.org/support/users/gab1982/)
 * (@gab1982)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conditional-statements-not-working-2/)
 * I was using qTranslate before I found this great plugin and I recently moved 
   over to this plugin, however I am encountering an issue of a conditional statement
   not working:
 *     ```
       if ( qtrans_getLanguage() == 'es' ) {	
   
       			// spanish questionnaire
       			echo FrmFormsController::get_form_shortcode(array('id' => 14, 'title' => false, 'description' => false));
   
       		} elseif ( qtrans_getLanguage() == 'de' ) {
   
       			// german questionnaire
       			echo FrmFormsController::get_form_shortcode(array('id' => 15, 'title' => false, 'description' => false));
   
       		} elseif ( qtrans_getLanguage() == 'fr' ) {
   
       			// french questionnaire
       			echo FrmFormsController::get_form_shortcode(array('id' => 16, 'title' => false, 'description' => false));
   
       		} else {
   
       			// english questionnaire
       			echo FrmFormsController::get_form_shortcode(array('id' => 13, 'title' => false, 'description' => false));
   
       		}
       ```
   
 * It worked fine with qTranslate so I am unsure why not here, if I keep the code
   in the file it shows a blank page so a PHP error of some kind but even if i change
   error reporting in the wp-config to true nothing shows.
 * thanks
    Graham
 * [https://wordpress.org/plugins/qtranslate-x/](https://wordpress.org/plugins/qtranslate-x/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Gunu](https://wordpress.org/support/users/grafcom/)
 * (@grafcom)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conditional-statements-not-working-2/#post-5918885)
 * [@gab1982](https://wordpress.org/support/users/gab1982/),
 * try **qtranxf**_getLanguage instead of qtrans_getLanguage.
 *  Thread Starter [gab1982](https://wordpress.org/support/users/gab1982/)
 * (@gab1982)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conditional-statements-not-working-2/#post-5918891)
 * worked great thanks 🙂
 *  Plugin Author [Gunu](https://wordpress.org/support/users/grafcom/)
 * (@grafcom)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conditional-statements-not-working-2/#post-5918893)
 * [@gab1982](https://wordpress.org/support/users/gab1982/),
 * You are welcome!
 * You can review this plugin to help other people to find out the value.
 * Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Conditional statements not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-x_f9f9f9.svg)
 * [qTranslate X](https://wordpress.org/plugins/qtranslate-x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-x/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-x/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Gunu](https://wordpress.org/support/users/grafcom/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/conditional-statements-not-working-2/#post-5918893)
 * Status: resolved