WP Facebook Open Graph protocol
og:locale for Japan needs a little change (2 posts)

  1. toshifme
    Posted 3 years ago #

    For the property of "og:locale," the plugin calls the WP function: get_locale().

    Unfortunately and oddly WordPress uses "ja" instead of ja_JP, which many other web services including Facebook use. FB has been strict on the locale setting and returning an error.

    I modified the line 181 with apply_filters like:

    echo '<meta property="og:locale" content="' . strtolower( esc_attr( apply_filters('wpfbogp_locale', get_locale()) ) ) . '"/>' . "\n";

    I can add "add_filter" to my own functions.php to return "ja_JP" in the plugin.
    Please consider this modification for the next version so that we can update it without losing customization. (The option setting for locale would be nice as well)

    Thank you for developing the plugin.


  2. Chuck Reynolds
    Plugin Author

    Posted 3 years ago #

    Yeah I know the ja_JP thing is broke in WordPress core... I brought it up once and they didn't seem like they wanted to fix it.
    I'll put this into github issues and we'll try and get something written in to handle it. I know a few other plugins have built their own functions to handle it... pretty annoying but I've heard this a few times from some sites in Japan.
    I'll see what I can do man. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Facebook Open Graph protocol
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.