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 12a37c6831
commit 121a52e615
2 changed files with 20 additions and 20 deletions

View File

@ -28,17 +28,17 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100"> <div class="box w-100">
<table class="table"> <table class="table">
<caption><?= $this->l11n->lang['Production']['Productions']; ?></caption> <caption><?= $this->l11n->getText('Production', 'Productions'); ?></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->l11n->lang['Production']['Status']; ?> <td><?= $this->l11n->getText('Production', 'Status'); ?>
<td><?= $this->l11n->lang[0]['ID']; ?> <td><?= $this->l11n->getText(0, 'ID'); ?>
<td><?= $this->l11n->lang[0]['ID']; ?> <td><?= $this->l11n->getText(0, 'ID'); ?>
<td class="wf-100"><?= $this->l11n->lang['Production']['Article']; ?> <td class="wf-100"><?= $this->l11n->getText('Production', 'Article'); ?>
<td><?= $this->l11n->lang['Production']['Quantity']; ?> <td><?= $this->l11n->getText('Production', 'Quantity'); ?>
<td><?= $this->l11n->lang['Production']['Start']; ?> <td><?= $this->l11n->getText('Production', 'Start'); ?>
<td><?= $this->l11n->lang['Production']['Due']; ?> <td><?= $this->l11n->getText('Production', 'Due'); ?>
<td><?= $this->l11n->lang['Production']['Done']; ?> <td><?= $this->l11n->getText('Production', 'Done'); ?>
<tfoot> <tfoot>
<tr><td colspan="8"><?= $footerView->render(); ?> <tr><td colspan="8"><?= $footerView->render(); ?>
<tbody> <tbody>
@ -52,7 +52,7 @@ echo $this->getData('nav')->render(); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($c === 0) : ?> <?php if($c === 0) : ?>
<tr> <tr>
<td colspan="8" class="empty"><?= $this->l11n->lang[0]['Empty']; ?> <td colspan="8" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>

View File

@ -28,17 +28,17 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100"> <div class="box w-100">
<table class="table"> <table class="table">
<caption><?= $this->l11n->lang['Production']['Productions']; ?></caption> <caption><?= $this->l11n->getText('Production', 'Productions'); ?></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->l11n->lang['Production']['Status']; ?> <td><?= $this->l11n->getText('Production', 'Status'); ?>
<td><?= $this->l11n->lang[0]['ID']; ?> <td><?= $this->l11n->getText(0, 'ID'); ?>
<td><?= $this->l11n->lang[0]['ID']; ?> <td><?= $this->l11n->getText(0, 'ID'); ?>
<td class="wf-100"><?= $this->l11n->lang['Production']['Article']; ?> <td class="wf-100"><?= $this->l11n->getText('Production', 'Article'); ?>
<td><?= $this->l11n->lang['Production']['Quantity']; ?> <td><?= $this->l11n->getText('Production', 'Quantity'); ?>
<td><?= $this->l11n->lang['Production']['Start']; ?> <td><?= $this->l11n->getText('Production', 'Start'); ?>
<td><?= $this->l11n->lang['Production']['Due']; ?> <td><?= $this->l11n->getText('Production', 'Due'); ?>
<td><?= $this->l11n->lang['Production']['Done']; ?> <td><?= $this->l11n->getText('Production', 'Done'); ?>
<tfoot> <tfoot>
<tr><td colspan="8"><?= $footerView->render(); ?> <tr><td colspan="8"><?= $footerView->render(); ?>
<tbody> <tbody>
@ -52,7 +52,7 @@ echo $this->getData('nav')->render(); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($c === 0) : ?> <?php if($c === 0) : ?>
<tr> <tr>
<td colspan="8" class="empty"><?= $this->l11n->lang[0]['Empty']; ?> <td colspan="8" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>