diff --git a/administrator/components/com_finder/helpers/indexer/helper.php b/administrator/components/com_finder/helpers/indexer/helper.php index 312c2f906d745..4692e7467ccaf 100644 --- a/administrator/components/com_finder/helpers/indexer/helper.php +++ b/administrator/components/com_finder/helpers/indexer/helper.php @@ -311,11 +311,21 @@ public static function addContentType($title, $mime = null) public static function isCommon($token, $lang) { static $data; + static $default; + + $langCode = $lang; + + // If language requested is wildcard, use the default language. + if ($lang == '*') + { + $default = $default === null ? substr(self::getDefaultLanguage(), 0, 2) : $default; + $langCode = $default; + } // Load the common tokens for the language if necessary. - if (!isset($data[$lang])) + if (!isset($data[$langCode])) { - $data[$lang] = self::getCommonWords($lang); + $data[$langCode] = self::getCommonWords($langCode); } // Check if the token is in the common array.