WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 19 months ago

Last modified 14 months ago

#42216 closed defect (bug) (invalid)

Facebook embeds use wrong locales

Reported by: Cry0nicS Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Embeds Keywords: close
Focuses: Cc:
PR Number:

Description

Version 4.7 brought awesome support for Facebook embeds. The issue is that the language / locales in wrong and keep changing for no particular reason.

Example: I have a website where Timezone is set to Bucharest, language to english, but the Facebook embeds where for 2 months in Ukrainian and now it's using nl_NL.

Example: https://esportsmedia.ro/highlights/hearthstone-highlights/golakka-winning-move-angeloshaggy/

There's no way to control it.

Issue persists in 4.8

Change History (7)

#1 @Cry0nicS
2 years ago

I tried executing something like this, but with no success.

<?php
add_filter( 'the_content', 'facebook_sdk_replace' );
function facebook_sdk_replace( $content ) {
    if ( is_single() ) {
        $content = str_replace("nl_NL", "en_US", $content);
    }
    return $content;
}

#2 @swissspidy
2 years ago

  • Keywords close added

Hey there,

This looks like a possible duplicate of #40656 to me. Please read the comments there to see how to fix this issue.

#3 @pratikthink
19 months ago

  • Resolution set to invalid
  • Status changed from new to closed

see @johnbillion comment on ticket #40656

#4 @Cry0nicS
19 months ago

@pratikthink
Complaining to Facebook doesn't really help. Been there and done that.
Since I am using Cloudflare, my embeds are either in Ukrainian or Netherlandish or random countries...

Looks horrible to my clients

#5 follow-up: @pratikthink
19 months ago

@Cry0nicS your og:locale is set to ro_RO
change it

#6 in reply to: ↑ 5 @Cry0nicS
19 months ago

@pratikthink I tried both en_EN and ro_RO... either would work for me.
But as I said, I get anything, but one of the two. Right now I am getting fr_FR. 2 days ago it was nl_NL etc...depending on what Cloudflare it's using

#7 @netweb
14 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.