}
$found = false;
- $l = new Text_LanguageDetect;
- $l->_name_mode = 2; // two letter codes
- $l->_threshold = 600; // make it a bit harder to be confident with a lng
- // IOW make it more possible that lng is correct
- $lng = $l->detectSimple($b['html']);
+
+ $opts = $b['item']['postopts'];
+ if ( $opts ) {
+ if ( preg_match('/^lang=([^;]*)/', $opts, $matches ) )
+ {
+ $lang = $matches[1];
+ $lng = Text_LanguageDetect_ISO639::nameToCode2($lang);
+ }
+ }
if ($lng==null)
return;
if (! in_array($lng, $arr))