WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Add WP filters in class-opengraph.php (7 posts)

  1. Daniel Koskinen
    Member
    Posted 2 years ago #

    Hi, the locale recognized by Facebook is not necessarily the same as the WordPress locale. This is the case in Finnish, where for years we have used 'fi', but Facebook only recognizes 'fi_FI'. This results in an error with the FB debugger. I know you can't take into account every single locale and exception in your plugin, but it would be nice if you could add filtering capabilities to the locale function in the WPSEO_OpenGraph class instead of just echoing the WP locale.

    Any other suggestions how to fix this are welcome of course.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Absolutely, just added it in trunk, it'll be in the 1.1.7 release.

  3. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Just realized I could also do a small "hack" and double it up automatically if the locale is only two letters long. So "fi" now automatically expands to "fi_fi" (Facebook actually wants it lowercased).

  4. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Or even better, a full on translation. Just added that to development version.

  5. nautilus7
    Member
    Posted 2 years ago #

    hi, lower case is one issue (as we talked about in the other thread).

    If the country code is 2 letters only, duplicating wont work in every case. In greek the current code is "el", but the 4 letter code should be "el_GR", not "el_el", so it wont work for facebook. But I guess it wont hurt anyway.

    (i have already made a request to the greek translation team to use the 4 letter code "el_GR" from now on)

  6. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    The new commit I just made will already convert el to el_gr :)

  7. Daniel Koskinen
    Member
    Posted 2 years ago #

    Hey, this is awesome. Automatic doubling is even better, since most people won't know how to create a filter. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic