From ffc3a9b3e23cd60ce7e9018b791ad790e7cde379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 30 Sep 2017 21:27:51 +0200 Subject: [PATCH] added lang env variable --- base.php | 2 +- js/lang.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/base.php b/base.php index 30eeea4..a7dc7f5 100644 --- a/base.php +++ b/base.php @@ -59,7 +59,7 @@ APS ); } -define('LOCALE', isset($_GET['locale']) ? $_GET['locale'] : 'en'); +define('LOCALE', isset($_GET['locale']) ? $_GET['locale'] : (getenv('ESP_LANG') ?: 'en')); $_messages = require(__DIR__ . '/lang/' . LOCALE . '.php'); $_pages = require(__DIR__ . '/_pages.php'); diff --git a/js/lang.js b/js/lang.js index 429f1ac..41e5e9c 100644 --- a/js/lang.js +++ b/js/lang.js @@ -1,14 +1,14 @@ // Generated from PHP locale file let _tr = { - "wifi.connected_ip_is": "Connected, IP is ", - "wifi.not_conn": "Not connected.", - "wifi.enter_passwd": "Enter password for \":ssid:\"", - "term_nav.fullscreen": "Fullscreen", - "term_conn.connecting": "Connecting", - "term_conn.waiting_content": "Waiting for content", - "term_conn.disconnected": "Disconnected", - "term_conn.waiting_server": "Waiting for server", - "term_conn.reconnecting": "Reconnecting" + "wifi.connected_ip_is": "Verbunden, IP ist ", + "wifi.not_conn": "Nicht verbunden.", + "wifi.enter_passwd": "Passwort für \":ssid:\"", + "term_nav.fullscreen": "Vollbild", + "term_conn.connecting": "Verbinden", + "term_conn.waiting_content": "Warten auf Inhalt", + "term_conn.disconnected": "Nicht verbunden", + "term_conn.waiting_server": "Warten auf Server", + "term_conn.reconnecting": "Verbinden" }; module.exports = function tr (key) { return _tr[key] || '?' + key + '?' }