WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] How to have plugin admin in English but allow Japanese form input? (19 posts)

  1. TWD
    Member
    Posted 5 years ago #

    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/

  2. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    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.

  3. TWD
    Member
    Posted 5 years ago #

    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?

  4. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    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?

  5. TWD
    Member
    Posted 5 years ago #

    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.

  6. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    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/

  7. Takayuki Miyoshi
    Member
    Posted 5 years ago #

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

  8. TWD
    Member
    Posted 5 years ago #

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

    Thank you Takayukister san!

  9. TWD
    Member
    Posted 5 years ago #

    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?

  10. TWD
    Member
    Posted 5 years ago #

    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.

  11. Takayuki Miyoshi
    Member
    Posted 5 years ago #

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

  12. ViennaMex
    Member
    Posted 5 years ago #

    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.

  13. TWD
    Member
    Posted 5 years ago #

    ?? 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.

  14. TWD
    Member
    Posted 5 years ago #

    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.

  15. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    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.

  16. TWD
    Member
    Posted 5 years ago #

    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.

  17. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    OK. I'm completely confused now.

    Then, you must forget about WPLANG. It's not related at all. You can write posts and comments in Japanese without any WPLANG setting. I've told you the same thing three times on this topic. See the Codex and find your answer yourself.

  18. TWD
    Member
    Posted 5 years ago #

    You can write posts and comments in Japanese without any WPLANG setting.

    Wrong.

    Forget it. I will use another plugin.

  19. Takayuki Miyoshi
    Member
    Posted 5 years ago #

    TWD,

    You should study, before posting stupid things.

Topic Closed

This topic has been closed to new replies.

About this Topic