• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Translation issue

Started by sevarf2,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Martin


PHPVibe A.

If you have switched to json (applied Mario's change), you need to delete the previous translations, as there are not the same encoding, and recreate them.

Open /moderator/edit-lang.php

Find at the top:

$translated = lang_terms($the_lang);
//var_dump($lang_terms);


remove // in front of var_dump and see if it has any output

var_dump($lang_terms);



max18121980

Note that these values can not be translated

  •  

PHPVibe A.

Quote from: max18121980 on
Note that these values can not be translated

Confirmed.
In lib/functions.php the

//global time ago
function time_ago($date,$granularity=2) {



should have this return

return $difference.' '._lang($periods[$j]).' '._lang($tense);

max18121980

Quote from: Alexander on
Confirmed.
In lib/functions.php the

//global time ago
function time_ago($date,$granularity=2) {



should have this return

return $difference.' '._lang($periods[$j]).' '._lang($tense);



I did so, and nothing has changed

//global time ago
function time_ago($date,$granularity=2) {
if (nullval($date)) {
return $difference.' '._lang($periods[$j]).' '._lang($tense);
}
$periods         = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
$lengths         = array("60","60","24","7","4.35","12","10");
$now             = time();
$unix_date         = strtotime($date);
  •  

PHPVibe A.

The "return" is far downer.

//global time ago
function time_ago($date,$granularity=2) {
if (nullval($date)) {
return '';
}
$periods         = array("second", "minute", "hour", "day", "week", "month", "year", "decade");
$lengths         = array("60","60","24","7","4.35","12","10");
$now             = time();
$unix_date         = strtotime($date);
// check validity of date
if(empty($unix_date)) {
return $date;
}
// is it future date or past date
if($now > $unix_date) {
$difference     = $now - $unix_date;
$tense         = "ago";
} else {
$difference     = $unix_date - $now;
$tense         = "from now";
}
for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
$difference /= $lengths[$j];
}
$difference = round($difference);
if($difference != 1) {
$periods[$j].= "s";
}
return $difference.' '._lang($periods[$j]).' '._lang($tense);
}

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 41431

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 71660

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 52154

when slecting to unpublish music mp3 - next page says unpublished video ?

Started by spirog


Replies: 2
Views: 4552

new account creation issue

Started by qadribrothers


Replies: 31
Views: 11768

Video that I've uploaded needs to have that value in admin to upload

Started by spirog


Replies: 4
Views: 6611

video,playlist,images, etc. (frontend) select all deselect all reselect all

Started by spirog


Replies: 3
Views: 6538