I am using qTranslate for bilingual WordPress. One problem I have is with Contact Form 7 contact pages. I need the Arabic texts as options in the Contact 7 form, only when the user is seeing the site in Arabic.
Lets say I have the following:
[radio paymethod "VISA" "MASTERCARD" "AMEX"]
I need to show these values in Arabic when its Arabic mode. Also need to get the error/success messages in the other languages (ie: when the language is switched).
I tried changing settings.php
of the plugin. It was
return (string) $wpcf7_request_uri;```
and now is
```php
$lang = "&lang=" . qtrans_getLanguage();
return ((string) $wpcf7_request_uri) . $lang;
It changes my url to: http://example.com/contact-us/&lang=ar#wpcf7-f289-t1-o1
and that results in a 404.
qTranslate has three configs for language.
- query string
- pre-Path Mode (puts /en/ in front)
- en.yoursite.com.
I am using 2.
I have found the solution.
The contact forms can be created using a
locale
at the beginning. I contacted the Plugin Author and he directed to this pageI also made changes to the
settings.php
of the Contact form 7 as the following: