Language ID rework

This commit is contained in:
Deon George
2012-07-30 15:10:58 +10:00
parent 5697e7985b
commit 7b0e87d28c
12 changed files with 51 additions and 13 deletions

View File

@@ -22,7 +22,12 @@ class Model_Product_Category extends ORMOSB {
);
public function description() {
return ($a=$this->product_category_translate->where('language_id','=','en')->find()->description) ? $a : 'No Description';
// If the user is not logged in, show the site default language
// @todo This needs to change to the session language.
if (! $ao=Auth::instance()->get_user())
$ao=Config::instance()->so;
return ($a=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $a : _('No Description');
}
public function list_active() {