WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. toshifme
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol/

  2. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.