Title: [Plugin: qTranslate] Still Errors in debug mode
Last modified: August 19, 2016

---

# [Plugin: qTranslate] Still Errors in debug mode

 *  [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-qtranslate-still-errors-in-debug-mode/)
 * After upgrade to 2.5.19 we have still a lot of errors in debug mode.
    Please 
   fix this as it is extremely easy to do and extremely annoying for the user.
 * PLEASE FIX THIS
 *     ```
       Notice: Undefined index: language in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 51
   
       Notice: Undefined index: in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 51
   
       Notice: Undefined index: language in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 52
   
       Notice: Undefined index: in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 52
   
       Notice: Undefined index: language in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 53
   
       Notice: Undefined index: in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 53
   
       Notice: Undefined index: language in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 54
   
       Notice: Undefined index: in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 54
   
       Notice: Undefined index: language in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 55
   
       Notice: Undefined index: language in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 61
   
       Notice: Undefined index: in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 61
   
       Warning: Cannot modify header information - headers already sent by (output started at /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_hooks.php:51) in /mnt/web7/41/15/51893315/htdocs/opajaap/test/wordpress/wp-content/plugins/qtranslate/qtranslate_core.php on line 71
       ```
   
 * [http://wordpress.org/extend/plugins/qtranslate/](http://wordpress.org/extend/plugins/qtranslate/)

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

 *  [mgiulio](https://wordpress.org/support/users/giuliom/)
 * (@giuliom)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-qtranslate-still-errors-in-debug-mode/#post-2036002)
 * Yes, I agree. Please, fix those undefined index notices. They are really annoying
   when inspecting the log file. Thanks in advance.
 *  Anonymous User
 * (@anonymized-1391468)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-qtranslate-still-errors-in-debug-mode/#post-2036076)
 * I am using version 2.5.28 and I removed these errors by updating the function
   in qtranslate_hooks.php to the following. If the language is not set it defaults
   to English.
 *     ```
       function qtrans_localeForCurrentLanguage($locale){
       	global $q_config;
       	// try to figure out the correct locale
       	$locale = array();
       	$lang = isset ($q_config['language'])? $q_config['language'] : 'en';
       	$locale[] = $q_config['locale'][$lang].".utf8";
       	$locale[] = $q_config['locale'][$lang]."@euro";
       	$locale[] = $q_config['locale'][$lang];
       	$locale[] = $q_config['windows_locale'][$lang];
       	$locale[] = $lang;
   
       	// return the correct locale and most importantly set it (wordpress doesn't, which is bad)
       	// only set LC_TIME as everyhing else doesn't seem to work with windows
       	setlocale(LC_TIME, $locale);
   
       	return $q_config['locale'][$lang];
       }
       ```
   
 *  Anonymous User
 * (@anonymized-1391468)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-qtranslate-still-errors-in-debug-mode/#post-2036077)
 * Note – I have since downgraded to qtranslate version 2.5.26 so that edit previews
   work. The fix I posted above still works with that version.

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

The topic ‘[Plugin: qTranslate] Still Errors in debug mode’ is closed to new replies.

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

 * 3 replies
 * 3 participants
 * Last reply from: Anonymous User
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-qtranslate-still-errors-in-debug-mode/#post-2036077)
 * Status: not resolved