PATH:
home
/
letacommog
/
letaweb
/
admin
/
classes
/
components
<?php class languageComponent { public $terms = array(); public function init() { } public function afterControllerInit($params) { $terms = include Yii::getPathofAlias('webroot.languages.'.Yii::app()->language).'.php'; if(isset($terms)) { foreach($terms as $k=>$v) { $this->terms[$k] = $v; } } //print_r($this->terms); } public function loadFile($file) { $_ = array(); if(file_exists($file)) include $file; if(isset($_)) { foreach($_ as $k=>$v) { $this->terms[$k] = $v; } } } public function __set($key, $value) { $key = trim($key); $this->terms[$key] = $value; } public function t($key) { $key = trim($key); if (isset($this->terms[$key])) { echo $this->terms[$key]; } else { echo $key; } } public function _isset($key) { $key = trim($key); return isset($this->terms[$key]); } public function term($key, $default='') { if (isset($this->terms[$key])) { return $this->terms[$key]; } if(strlen($default)) return $default; return $key; } }
[+]
..
[-] colorComponent.php
[edit]
[-] authorizationComponent.php
[edit]
[-] hostingComponent.php
[edit]
[-] configComponent.php
[edit]
[-] siteComponent.php
[edit]
[-] urlComponent.php
[edit]
[-] paymentComponent.php
[edit]
[-] authManager.php
[edit]
[-] guestComponent.php
[edit]
[-] cmsComponent.php
[edit]
[-] languageComponent.php
[edit]
[-] contextComponent.php
[edit]
[-] cartComponent.php
[edit]
[-] customerComponent.php
[edit]