Skip to content

Commit

Permalink
Fix for inLanguage Structured Data for single language sites.
Browse files Browse the repository at this point in the history
Fir for #1075
  • Loading branch information
eSilverStrike committed Sep 24, 2020
1 parent 598e54d commit edaeda8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/classes/structureddata.class.php
Expand Up @@ -204,7 +204,7 @@ private function create_name($type, $id)
*/
public function add_type($type, $id, $sd_type, $properties = array(), $attributes = array(), &$data = null)
{
global $_CONF;
global $_CONF, $LANG_ISO639_1;

// Create structured data name
$sd_name = $this->create_name($type, $id);
Expand Down Expand Up @@ -253,7 +253,7 @@ public function add_type($type, $id, $sd_type, $properties = array(), $attribute
}
if (empty($lang_id)) {
// Assume default language of site
$lang_id = COM_getLanguageId($_CONF['language_site_default']);
$lang_id = $LANG_ISO639_1;
}
$data['inLanguage'] = $lang_id;
break;
Expand Down

0 comments on commit edaeda8

Please sign in to comment.