Support » Plugin: WP Facebook Open Graph protocol » og:locale for Japan needs a little change

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

Viewing 1 replies (of 1 total)
  • Plugin Author Chuck Reynolds


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

Viewing 1 replies (of 1 total)
  • The topic ‘og:locale for Japan needs a little change’ is closed to new replies.