WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 4 weeks ago

Last modified 4 weeks ago

#42216 closed defect (bug) (invalid)

Facebook embeds use wrong locales

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

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 (6)

#1 @Cry0nicS
8 months 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
8 months 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
4 weeks ago

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

see @johnbillion comment on ticket #40656

#4 @Cry0nicS
4 weeks 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
4 weeks ago

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

#6 in reply to: ↑ 5 @Cry0nicS
4 weeks 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

Note: See TracTickets for help on using tickets.