Revize 117
Přidáno uživatelem Michal Kliment před asi 16 roky(ů)
freenetis/trunk/kohana/application/models/translation.php | ||
---|---|---|
<?php
|
||
class Translation_Model extends ORM {
|
||
|
||
public function __construct($id = false)
|
||
{
|
||
parent::__construct($id);
|
||
}
|
||
|
||
public function get_translation($term)
|
||
{
|
||
|
||
$result = $this->where('original_term',$term)->where('lang',Config::item('locale.lang'))->find();
|
||
if($result->translated_term!="") return $result->translated_term;
|
||
else return $term;
|
||
|
||
}
|
||
|
||
}
|
||
?>
|
Také k dispozici: Unified diff
Pridani modelu translation