Support » Plugins and Hacks » [Resolved] Bilingual implementation

[Resolved] Bilingual implementation

  • I 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

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

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

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


Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Takayuki Miyoshi


    You don’t have to think it so difficult. Simply make two forms for two languages (see Contact Form in Your Language), and place en form in en post, ar form in ar post.


    Now can I change the locale of an existing form I saved?

    Plugin Author Takayuki Miyoshi


    Each form data doesn’t have any locale information. So you don’t have to change it.

    If that is so, please tell me how I can get different locale for an existing saved contact form.

    Also, offtopic to this thread but. I would request you to make a dynamic option to have the sequence of elements changed like below:

    if ( ! $this->responses_count )
    			$form .= $this->form_response_output();
    		$form .= $this->form_hidden_fields();
    		$form .= $this->form_elements();

    Because, twitterbootstrap by default puts the markup at the top of form.

    I am assuming that, when we select the locale before creating the contact form. It fetches the proper locale strings and the response strings with this post and maybe saves them also.

    The lines of codes I pasted above are from:

    Without making the change directly into the plugin code I wasn’t able to get the form in TwitterBootstrap friendly manner.

    Also, submitting the form changes the site language so I had to modify your settings.php like below:

    return ((string) '/'.qtrans_getLanguage().$wpcf7_request_uri);

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Bilingual implementation’ is closed to new replies.