added lang env variable

box-drawing
Ondřej Hruška 7 years ago
parent 58eb4cfbed
commit ffc3a9b3e2
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      base.php
  2. 18
      js/lang.js

@ -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'); $_messages = require(__DIR__ . '/lang/' . LOCALE . '.php');
$_pages = require(__DIR__ . '/_pages.php'); $_pages = require(__DIR__ . '/_pages.php');

@ -1,14 +1,14 @@
// Generated from PHP locale file // Generated from PHP locale file
let _tr = { let _tr = {
"wifi.connected_ip_is": "Connected, IP is ", "wifi.connected_ip_is": "Verbunden, IP ist ",
"wifi.not_conn": "Not connected.", "wifi.not_conn": "Nicht verbunden.",
"wifi.enter_passwd": "Enter password for \":ssid:\"", "wifi.enter_passwd": "Passwort für \":ssid:\"",
"term_nav.fullscreen": "Fullscreen", "term_nav.fullscreen": "Vollbild",
"term_conn.connecting": "Connecting", "term_conn.connecting": "Verbinden",
"term_conn.waiting_content": "Waiting for content", "term_conn.waiting_content": "Warten auf Inhalt",
"term_conn.disconnected": "Disconnected", "term_conn.disconnected": "Nicht verbunden",
"term_conn.waiting_server": "Waiting for server", "term_conn.waiting_server": "Warten auf Server",
"term_conn.reconnecting": "Reconnecting" "term_conn.reconnecting": "Verbinden"
}; };
module.exports = function tr (key) { return _tr[key] || '?' + key + '?' } module.exports = function tr (key) { return _tr[key] || '?' + key + '?' }

Loading…
Cancel
Save