Support » Plugins and Hacks » [Plugin: Contact Form 7] How to have plugin admin in English but allow Japanese form input?

  • Hello

    My blog is in English but I want to allow Japanese users to comment using their native language.

    I have changed the config file to add

    define (‘WPLANG’, ‘ja’);

    to allow this.

    The problem with Contact Form 7 Plugin is that
    the plugin admin options now defaults to Japanese
    in the Admin panel.

    Is there a way to keep the admin and form label default options in English while still allowing Japanese text in the mail message?

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 15 replies - 1 through 15 (of 18 total)
  • It’s not necessary for you to define (‘WPLANG’, ‘ja’) for allowing Japanese text in the mail message. It allows any language text by default. No settings are necessary.

    It’s not necessary for you to define (‘WPLANG’, ‘ja’) for allowing Japanese text in the mail message.

    OK thats fine, BUT…

    if I remove the (‘WPLANG’, ‘ja’) from the config file,
    Japanese visitors won’t be able to leave regular comments in
    other pages on the blog. Am I wrong?

    I can’t get the situation. It should work well no matter what WPLANG is set. Do you use other plugins with it? Can you show your site URL?

    It should work well no matter what WPLANG is set.

    Yes it does “work” in the sense that it sends mail.
    Yes, you are correct. It sends mail regardless of the WPLANG setting.

    But that is not the point I was making.

    The point is that I want to be able to write posts/pages in English/Japanese and allow my visitors to leave comments on posts/pages in English/Japanese.
    The only way I know to do that is to adjust the WPLANG setting as I described above.

    BUT…
    Doing so means that all of the Admin for the Contact 7 Plugin is displayed in Japanese (the rest of the Dashboard is in English).

    Do you use other plugins with it?

    No. Its a clean install.

    Do you mean you wish to display English for admins, Japanese for visitors? If so, this plugin may be helpful.
    http://wordpress.org/extend/plugins/bogo/

    Or, if you have English and Japanese contents, this plugin suits better.
    http://wordpress.org/extend/plugins/sitepress-multilingual-cms/

    Thanks. Its the admin that is the problem so “bogo” might be the answer.
    I will check both tomorrow.

    Thank you Takayukister san!

    I tried Bogo.

    There is a bit of a problem though.

    If I upload the .mo file into “/includes/languages” it sets all the default interface elements on the blog page to Japanese.
    For example all the date formats appear in Japanese, archive month select list is Japanese, basically all the side bar headings Japanese etc.

    Is there a way to keep the visitor defaults in English and still use this plugin?

    I am talking about the blog front end NOT the admin side.
    The plugin works just fine for that.

    But I want to keep my blog front end in English.
    But upload the .mo file overides that.

    Hope I explained that clearly.

    ?? Wasn’t you meaning to make all the front end in Japanese?

    TWD, is the ONE thing you have not explained about your situation is that you are assuming that contact-form 7 will not SEND properly encoded Japanese characters unless it interacts with a Japanese language file before the email is sent?

    My understanding is that you need to administer the contact form with English text and links while in the Control panel and that on the page that contains the form on your website you still want the text on it displayed in English. But you want to ALSO make sure that someone typing Japanese characters into the form fields and sending the form sends properly formatted Japanese characters that can be read the same way when the email arrives.

    Takayukister seems to be saying that leaving the default language in English does not discriminate against Japanese characters. At least that’s what I read in his reply:

    It’s not necessary for you to define (‘WPLANG’, ‘ja’) for allowing Japanese text in the mail message. It allows any language text by default. No settings are necessary.

    ?? Wasn’t you meaning to make all the front end in Japanese?

    No.
    I want the front end AND the back end in English.

    But visitors still need to be able to leave comments in Japanese.
    Without the (‘WPLANG’,’ja’) it just turns comments to mojibake.

    TWD, is the ONE thing you have not explained about your situation is that you are assuming that contact-form 7 will not SEND properly encoded Japanese characters unless it interacts with a Japanese language file before the email is sent?

    Actually, I wasn’t assuming anything.
    I know that the contact form works fine regardless of the language setting.

    I already explained why the I am using (‘WPLANG’,’ja’) for reasons unrelated to the contact form itself.

    My query is about the contact form “backend” and how to keep THAT in English.
    Because the moment it reads (‘WPLANG’,’ja’) it defaults to Japanese.

    I hope it is clear this time.

    Without the (‘WPLANG’,’ja’) it just turns comments to mojibake.

    At last I got what the problem was.

    The mojibake problem is occurred by the difference of character encoding between front-end and back-end (mail header). It is not related to WPLANG.

    The default character encoding of WordPress is UTF-8, and if you have no special configurations, Contact Form 7 should send mail with UTF-8 encoding, so no mojibake happens.

    But if you have kind of plugins which change one of the encodings to different encoding such as ISO-2022-JP or Shift-JIS, and it doesn’t apply necessary converting to strings, it must make mojibake. So this is what you need to fix. Check the encodings of front-end and back-end.

    At last I got what the problem was.

    No you haven’t.
    You are completely confused.

    Just forget about your plugin for a minute.
    Pretend it doesn’t exist.
    Now pretend that you are me.

    I DONT want the front end interface in Japanese.
    But I DO want to write POSTS and COMMENTS in Japanese!
    Not contact form,… POSTS & COMMENTS.
    Please try to separate those different things in your mind.

    How would you do that, other than change WPLANG?
    I don’t believe there is any other way.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: Contact Form 7] How to have plugin admin in English but allow Japanese form input?’ is closed to new replies.