Contact form 7 with qtranslate

I am using qtranslate for bilingual Wordpress. One of the problems I am facing is the contact pages of contact person 7.

I need Arabic texts as options only when the user sees the site in Arabic.

Say I have the following:

[radio paymethod "VISA" "MASTERCARD" "AMEX"] 

I need to show the values ​​in Arabic in Arabic mode.

I also need to get error / success messages in other languages ​​(e.g. when switching a language).

I tried changing the settings.php plugin. It was

 return (string) $wpcf7_request_uri; 

and now

 $lang = "&lang=" . qtrans_getLanguage(); return ((string) $wpcf7_request_uri) . $lang; 

Changes my url to: http://example.com/contact-us/&lang=ar#wpcf7-f289-t1-o1 and becomes 404 .

qTranslate has three configurations for the language. 1. query string 2. pre-Path Mode (puts / en / front) 3. ru.yoursite.com. I am using 2.

+4
source share
1 answer

I have found a solution.

Contact forms can be created using locale at the beginning. I contacted the author of the plugin and directed to this page

I also made changes to the settings.php contact form 7 as follows:

 function wpcf7_get_request_uri() { global $wpcf7_request_uri; if (($GLOBALS['q_config']['hide_default_language'] == 1) AND ($GLOBALS['q_config']['default_language'] != $GLOBALS['q_config']['language'])) return ((string) '/' . $GLOBALS['q_config']['language'] . $wpcf7_request_uri); } 
+1
source

All Articles