/** * Invokes the whole application. */ public function invoke() { $this->_pageKey = getGetValue('page', 'accounts'); $this->_subKey = getGetValue('sub'); $sessionLang = jpWotSession::get('active_language'); if (empty($sessionLang)) { jpWotSession::set('active_language', strtolower(trim(jpWotConfig::$lang))); } $changeLang = getPostValue('lang'); if (isset($changeLang['current'], $changeLang['new']) && $changeLang['current'] != $changeLang['new']) { jpWotSession::set('active_language', $changeLang['new']); $langKey = $changeLang['new']; } else { $langKey = jpWotSession::get('active_language'); } $langKey = $this->getIniLanguageKey($langKey); $language = jpWotLanguage::getInstance(); $language->load('main', BPATH, $langKey); $language->load('filter', BPATH, $langKey); $language->load($this->_pageKey, BPATH, $langKey); $controller = $this->getControllerInstance(); $page = getPostValue('request'); if (!empty($page)) { $controller->setRequestData($page); } $controller->index(); }
/** * @param string $component * @param string $basePath * @param string $langKey * @return bool */ public function load($component = '', $basePath = '', $langKey = 'en-GB') { $filepath = $basePath . '/lang/' . $langKey . '/' . $langKey . '.' . trim($component) . '.ini'; if (!is_file($filepath)) { return false; } $langArray = parse_ini_file($filepath); if (empty($langArray)) { return false; } self::$_cache = array_merge(self::$_cache, $langArray); }
<?php /** * @package jpWot * @author Philipp John <*****@*****.**> * @copyright (c) 2014, Philipp John * @license http://opensource.org/licenses/MIT MIT see LICENSE.md */ $result = $data['result']; $clanID = $result['clan_id']; $info = $result['info']->{$clanID}; $count = 0; $language = jpWotLanguage::getInstance(); ?> <div class="row"> <div class="col-lg-12"> <div id="info"> <div class="row"> <div class="col-lg-12"> <h4><?php echo $language->get('DETAIL_GENERAL_HEADLINE'); ?> </h4> <div class="row"> <div class="col-lg-6"> <table class="table"> <tbody> <tr> <td>Name</td> <td><?php echo $info->name;