#40656 closed defect (bug) (invalid)
WordPress Facebook integration does not obey locale
Reported by: | ChrisBAshton | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8 |
Component: | Embeds | Keywords: | |
Focuses: | Cc: |
Description
It appears that the Facebook integration uses the location of the server WordPress is running on to determine which locale to request from Facebook, rather than obeying the locale configured in the WordPress settings.
---
A client site of mine is hosted in Europe, though its language is set to "en_US", verified by calling:
<?php echo get_locale(); ?>
Despite this, when pulling in a Facebook post, the generated embed code uses the "da_DK" locale.
https://www.facebook.com/loopinglive/posts/426403944363449
=>
Change History (2)
Note: See
TracTickets for help on using
tickets.
This is probably something you should report to Facebook (good luck), as WordPress is correctly outputting the
lang
attribute on thehtml
element. Facebook likely uses heuristics to determine if the actual page language is indeed English or not whenen_US
is used, similar to what Google Chrome does.This is the unfortunate situation that the web finds itself in when services cannot trust web standards due to incorrect implementations (ie. sites not in US English but still using
en_US
as the lang).In your situation you may be able to make use of the
og:locale
OpenGraph tag to persuade Facebook that your content really is in US English.