PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

encoding for the validation message in Japanese

  1. triceratops
    Member

    Hi
    I'm trying to change a form validation message into Japanese but it's coming out mumbo jumbo. Like this ....
    �K�v�ȍ��ڂ�S�Ă��L��肢���܂��B

    This is the code I've added to functions.php ....

    add_filter("gform_validation_message", "change_message", 10, 2);
    function change_message($message, $form){
    return "必要な項目を全てご記入お願いします。";
    }

    What would I need to add to change the encoding to something that will give me the Japanese?

    Thanks
    Mark

    Posted 12 years ago on Friday July 27, 2012 | Permalink
  2. Seems like we tried something like this in the past? Can you use the HTML entities for those characters, rather than the actual characters? Like we did here:

    http://www.gravityhelp.com/forums/topic/first-last-name-labels-into-japanese#post-64387

    I don't have a good resource for the conversion from Japanese character to HTML entity but you can find one online.

    Posted 12 years ago on Sunday July 29, 2012 | Permalink
  3. triceratops
    Member

    Yes we did. It worked when I just had to do two characters, but I thought there might be a better way to do it by specifying the encoding or something. Using HTML entitys for long sentences is going to be a bit of a pain.

    Is there no place I could just specify the charset and be done with it?

    Thanks
    Mark

    Posted 12 years ago on Sunday July 29, 2012 | Permalink
  4. triceratops
    Member

    I found a site that will convert to HTML entities for you. Here it is for reference ....

    http://hp.vector.co.jp/authors/VA022023/javascript/make_html_entity-ja.htm

    Posted 12 years ago on Sunday July 29, 2012 | Permalink
  5. Does that work for you, or would you still like to investigate translating certain strings for your Gravity Form automatically with a language setting or something?

    Posted 12 years ago on Sunday July 29, 2012 | Permalink