Advertisement
fabi0

Untitled

May 23rd, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  * To change this license header, choose License Headers in Project Properties.
  5.  * To change this template file, choose Tools | Templates
  6.  * and open the template in the editor.
  7.  */
  8.  
  9. /**
  10.  * Description of Language
  11.  *
  12.  * @author fabi0
  13.  */
  14.  
  15. namespace Models;
  16.  
  17. class Language {
  18.  
  19.     private $_defaultLanguage = "en";
  20.     private $setLanguage = null;
  21.     private $_lang = array();
  22.  
  23.     public function __construct() {
  24.         if ($this->checkCookie()) {
  25.             include './Lang/' . $this->checkCookie() . '.php';
  26.             $this->_lang = $lll;
  27.         } else {
  28.             include './Lang/' . $this->_defaultLanguage . '.php';
  29.             $this->_lang = $lll;
  30.         }
  31.     }
  32.  
  33.     public function index() {
  34.         \Models\Redirect::to();
  35.     }
  36.  
  37.     public function get($keyword) {
  38.         return $this->_lang[$keyword];
  39.     }
  40.  
  41.     public function checkCookie() {
  42.         return \Models\Cookies::get(\Models\Config::get("language/cookie_name"));
  43.     }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement