mirror of
https://github.com/friendica/friendica
synced 2025-12-07 05:47:10 +01:00
Now the third most likely languages are shown.
In "vier" the tag line is now suppressed. It saves a little bit of space - and is redundant.
This commit is contained in:
parent
348f43157a
commit
82820d8e95
4 changed files with 58 additions and 6 deletions
|
|
@ -213,8 +213,28 @@ class Item extends BaseObject {
|
|||
localize_item($item);
|
||||
|
||||
if ($item["postopts"]) {
|
||||
$langdata = explode(";", $item["postopts"]);
|
||||
$langstr = substr($langdata[0], 5)." (".round($langdata[1]*100, 1)."%)";
|
||||
//$langdata = explode(";", $item["postopts"]);
|
||||
//$langstr = substr($langdata[0], 5)." (".round($langdata[1]*100, 1)."%)";
|
||||
$langstr = "";
|
||||
if (substr($item["postopts"], 0, 5) == "lang=") {
|
||||
$postopts = substr($item["postopts"], 5);
|
||||
|
||||
$languages = explode(":", $postopts);
|
||||
|
||||
if (sizeof($languages) == 1) {
|
||||
$languages = array();
|
||||
$languages[] = $postopts;
|
||||
}
|
||||
|
||||
foreach ($languages as $language) {
|
||||
$langdata = explode(";", $language);
|
||||
if ($langstr != "")
|
||||
$langstr .= ", ";
|
||||
|
||||
//$langstr .= $langdata[0]." (".round($langdata[1]*100, 1)."%)";
|
||||
$langstr .= round($langdata[1]*100, 1)."% ".$langdata[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$body = prepare_body($item,true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue