Language display optimized

Language is now no longer direct array access but provided through a
function. This can be later used to hot load language files instead of
pre-loading them.
This commit is contained in:
Dennis Eichhorn 2016-07-02 14:14:31 +02:00
parent 772d5aeee2
commit c24a582406
4 changed files with 30 additions and 30 deletions

View File

@ -17,28 +17,28 @@
echo $this->getData('nav')->render(); ?>
<section class="box w-50">
<header><h1><?= $this->l11n->lang['EventManagement']['Event']; ?></h1></header>
<header><h1><?= $this->l11n->getText('EventManagement', 'Event'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td colspan="3"><label for="iName"><?= $this->l11n->lang['EventManagement']['Name']; ?></label>
<tr><td colspan="3"><label for="iName"><?= $this->l11n->getText('EventManagement', 'Name'); ?></label>
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder="" required><td>
<tr><td colspan="3"><label for="iDescription"><?= $this->l11n->lang['EventManagement']['Description']; ?></label>
<tr><td colspan="3"><label for="iDescription"><?= $this->l11n->getText('EventManagement', 'Description'); ?></label>
<tr><td colspan="2"><textarea id="iDescription" name="description"></textarea><td>
<tr><td colspan="3"><label for="iStatus"><?= $this->l11n->lang['EventManagement']['Status']; ?></label>
<tr><td colspan="3"><label for="iStatus"><?= $this->l11n->getText('EventManagement', 'Status'); ?></label>
<tr><td colspan="2"><select id="iStatus" name="status">
<option value="">
</select><td>
<tr><td colspan="3"><label for="iFiles"><?= $this->l11n->lang['EventManagement']['Files']; ?></label>
<tr><td colspan="3"><label for="iFiles"><?= $this->l11n->getText('EventManagement', 'Files'); ?></label>
<tr><td colspan="2"><input type="file" id="iFiles" name="file" multiple><td>
<tr><td><label for="iStart"><?= $this->l11n->lang['EventManagement']['Start'] ?><label><td><label for="iEnd"><?= $this->l11n->lang['EventManagement']['End'] ?><label><td>
<tr><td><label for="iStart"><?= $this->l11n->getText('EventManagement']['Start'] ?><label><td><label for="iEnd"><?= $this->l11n->lang['EventManagement', 'End') ?><label><td>
<tr><td><input type="datetime-local" id="iStart" name="start" required><td><input type="datetime-local" id="iEnd" name="end" required><td>
<tr><td><label for="iResponsibility"><?= $this->l11n->lang['EventManagement']['Responsibility']; ?></label><td><label for="iUser"><?= $this->l11n->lang['EventManagement']['UserGroup']; ?></label><td>
<tr><td><label for="iResponsibility"><?= $this->l11n->getText('EventManagement']['Responsibility']; ?></label><td><label for="iUser"><?= $this->l11n->lang['EventManagement', 'UserGroup'); ?></label><td>
<tr><td><select id="iStatus" name="status">
<option value="">
</select>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->l11n->lang[0]['Add']; ?></button>
<tr><td colspan="3"><input type="submit" value="<?= $this->l11n->lang[0]['Create']; ?>">
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->l11n->getText(0, 'Add'); ?></button>
<tr><td colspan="3"><input type="submit" value="<?= $this->l11n->getText(0, 'Create'); ?>">
</table>
</form>
</div>

View File

@ -23,13 +23,13 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="table">
<caption><?= $this->l11n->lang['EventManagement']['Events'] ?></caption>
<caption><?= $this->l11n->getText('EventManagement', 'Events') ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang['EventManagement']['Status']; ?>
<td class="wf-100"><?= $this->l11n->lang['EventManagement']['Title']; ?>
<td><?= $this->l11n->lang['EventManagement']['Start']; ?>
<td><?= $this->l11n->lang['EventManagement']['End']; ?>
<td><?= $this->l11n->getText('EventManagement', 'Status'); ?>
<td class="wf-100"><?= $this->l11n->getText('EventManagement', 'Title'); ?>
<td><?= $this->l11n->getText('EventManagement', 'Start'); ?>
<td><?= $this->l11n->getText('EventManagement', 'End'); ?>
<tfoot>
<tr>
<td colspan="5"><?= $footerView->render(); ?>
@ -37,7 +37,7 @@ echo $this->getData('nav')->render(); ?>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<tr><td colspan="5" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?>
<?php endif; ?>
</table>
</div>

View File

@ -17,28 +17,28 @@
echo $this->getData('nav')->render(); ?>
<section class="box w-50">
<header><h1><?= $this->l11n->lang['EventManagement']['Event']; ?></h1></header>
<header><h1><?= $this->l11n->getText('EventManagement', 'Event'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td colspan="3"><label for="iName"><?= $this->l11n->lang['EventManagement']['Name']; ?></label>
<tr><td colspan="3"><label for="iName"><?= $this->l11n->getText('EventManagement', 'Name'); ?></label>
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder="" required><td>
<tr><td colspan="3"><label for="iDescription"><?= $this->l11n->lang['EventManagement']['Description']; ?></label>
<tr><td colspan="3"><label for="iDescription"><?= $this->l11n->getText('EventManagement', 'Description'); ?></label>
<tr><td colspan="2"><textarea id="iDescription" name="description"></textarea><td>
<tr><td colspan="3"><label for="iStatus"><?= $this->l11n->lang['EventManagement']['Status']; ?></label>
<tr><td colspan="3"><label for="iStatus"><?= $this->l11n->getText('EventManagement', 'Status'); ?></label>
<tr><td colspan="2"><select id="iStatus" name="status">
<option value="">
</select><td>
<tr><td colspan="3"><label for="iFiles"><?= $this->l11n->lang['EventManagement']['Files']; ?></label>
<tr><td colspan="3"><label for="iFiles"><?= $this->l11n->getText('EventManagement', 'Files'); ?></label>
<tr><td colspan="2"><input type="file" id="iFiles" name="file" multiple><td>
<tr><td><label for="iStart"><?= $this->l11n->lang['EventManagement']['Start'] ?><label><td><label for="iEnd"><?= $this->l11n->lang['EventManagement']['End'] ?><label><td>
<tr><td><label for="iStart"><?= $this->l11n->getText('EventManagement']['Start'] ?><label><td><label for="iEnd"><?= $this->l11n->lang['EventManagement', 'End') ?><label><td>
<tr><td><input type="datetime-local" id="iStart" name="start" required><td><input type="datetime-local" id="iEnd" name="end" required><td>
<tr><td><label for="iResponsibility"><?= $this->l11n->lang['EventManagement']['Responsibility']; ?></label><td><label for="iUser"><?= $this->l11n->lang['EventManagement']['UserGroup']; ?></label><td>
<tr><td><label for="iResponsibility"><?= $this->l11n->getText('EventManagement']['Responsibility']; ?></label><td><label for="iUser"><?= $this->l11n->lang['EventManagement', 'UserGroup'); ?></label><td>
<tr><td><select id="iStatus" name="status">
<option value="">
</select>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->l11n->lang[0]['Add']; ?></button>
<tr><td colspan="3"><input type="submit" value="<?= $this->l11n->lang[0]['Create']; ?>">
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->l11n->getText(0, 'Add'); ?></button>
<tr><td colspan="3"><input type="submit" value="<?= $this->l11n->getText(0, 'Create'); ?>">
</table>
</form>
</div>

View File

@ -23,13 +23,13 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="table">
<caption><?= $this->l11n->lang['EventManagement']['Events'] ?></caption>
<caption><?= $this->l11n->getText('EventManagement', 'Events') ?></caption>
<thead>
<tr>
<td><?= $this->l11n->lang['EventManagement']['Status']; ?>
<td class="wf-100"><?= $this->l11n->lang['EventManagement']['Title']; ?>
<td><?= $this->l11n->lang['EventManagement']['Start']; ?>
<td><?= $this->l11n->lang['EventManagement']['End']; ?>
<td><?= $this->l11n->getText('EventManagement', 'Status'); ?>
<td class="wf-100"><?= $this->l11n->getText('EventManagement', 'Title'); ?>
<td><?= $this->l11n->getText('EventManagement', 'Start'); ?>
<td><?= $this->l11n->getText('EventManagement', 'End'); ?>
<tfoot>
<tr>
<td colspan="5"><?= $footerView->render(); ?>
@ -37,7 +37,7 @@ echo $this->getData('nav')->render(); ?>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<tr><td colspan="5" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?>
<?php endif; ?>
</table>
</div>