Added the language script in the layout templates

This commit is contained in:
Alex Tselegidis 2021-12-13 07:48:56 +01:00
parent 530422608a
commit 4f9fbc05e3
5 changed files with 8 additions and 1 deletions

View file

@ -4,6 +4,6 @@
*/ */
?> ?>
<script <?= $attributes ?>> <script <?= $attributes ?>>
const EALang = <?= json_encode($this->lang->language) ?> window.App.Lang = <?= json_encode($this->lang->language) ?>
</script> </script>

View file

@ -54,6 +54,8 @@
<script src="<?= asset_url('assets/js/layouts/account_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/account_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('language_script') ?>
<script> <script>
const GlobalVariables = { const GlobalVariables = {
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>, csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,

View file

@ -60,6 +60,8 @@
<script src="<?= asset_url('assets/js/layouts/backend_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/backend_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('language_script') ?>
<?php slot('scripts') ?> <?php slot('scripts') ?>
</body> </body>

View file

@ -105,6 +105,7 @@
<script src="<?= asset_url('assets/js/layouts/booking_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/booking_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('language_script') ?>
<script> <script>
$(function () { $(function () {

View file

@ -63,6 +63,8 @@
<script src="<?= asset_url('assets/js/layouts/message_layout.js') ?>"></script> <script src="<?= asset_url('assets/js/layouts/message_layout.js') ?>"></script>
<script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script> <script src="<?= asset_url('assets/js/utils/general_functions.js') ?>"></script>
<?php component('language_script') ?>
<?php google_analytics_script() ?> <?php google_analytics_script() ?>
<?php slot('scripts') ?> <?php slot('scripts') ?>