Jump to content

Cannot translate module is working


bera_ramazan

Recommended Posts

public function timeAgo($ptime) { 
		$etime = time() - strtotime($ptime); 
		$a = array( 
			12 * 30 * 24 * 60 * 60 => 'year', 
			30 * 24 * 60 * 60 => 'moon', 
			7 * 24 * 60 * 60 => 'week', 
			24 * 60 * 60 => 'day', 
			60 * 60    => 'hour', 
			60 => 'sec', 
			1 => 'sec' 
		); 

		foreach($a as $secs => $str) { 
			$d = $etime / $secs; 
			if($d >= 1) { 
				$r = round($d); 
				return $r.' '.$str.' '.$this->l('ago');
			} 
		} 
	}

resim.png.88f1fb9fd80912a36c9e45790d995028.png

 

how to use this->l

dont working in function module

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...