I configured my interface language to be different than the content language.

But by default the language that is used for disqus is the interface language.

Drupal\disqus\Element\Disqus.php;

89  $disqus['language'] = \Drupal::languageManager()->getCurrentLanguage()->getId();

instead let's use the content language

      $disqus['language'] = \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();

Comments

Tom Robert created an issue. See original summary.

tom robert’s picture

StatusFileSize
new601 bytes
tom robert’s picture

StatusFileSize
new754 bytes

Forgot the use statement for LanguageInterface.

damienmckenna’s picture

Status: Active » Needs review
gaurav.kapoor’s picture

Thanks for raising this issue @Tom Robert. I found another similar issue https://www.drupal.org/project/redirect/issues/2991423 in the redirect module and as per it we can set

$disqus['language'] = \Drupal::languageManager()->getCurrentLanguage()->getId();

to

$disqus['language'] = \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId();

This can be a temporary solution till the time the core issue https://www.drupal.org/project/drupal/issues/3067007 is fixed or suggests anything.

@DamienMcKenna Do you have any suggestion on what should we do here?

gaurav.kapoor’s picture

Version: 8.x-1.x-dev » 2.0.x-dev