Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- * Description of Language
- *
- * @author fabi0
- */
- namespace Models;
- class Language {
- private $_defaultLanguage = "en";
- private $setLanguage = null;
- private $_lang = array();
- public function __construct() {
- if ($this->checkCookie()) {
- include './Lang/' . $this->checkCookie() . '.php';
- $this->_lang = $lll;
- } else {
- include './Lang/' . $this->_defaultLanguage . '.php';
- $this->_lang = $lll;
- }
- }
- public function index() {
- \Models\Redirect::to();
- }
- public function get($keyword) {
- return $this->_lang[$keyword];
- }
- public function checkCookie() {
- return \Models\Cookies::get(\Models\Config::get("language/cookie_name"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement