From: Andrew Dolgov Date: Sat, 11 Aug 2007 14:25:51 +0000 (+0100) Subject: add lang to login form (2) X-Git-Tag: 1.2.14~65 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f8c612d48305cfb54c6bfe44c55689ed062eca88;p=tt-rss.git add lang to login form (2) --- diff --git a/functions.php b/functions.php index cd30b456..1dd0f493 100644 --- a/functions.php +++ b/functions.php @@ -8,6 +8,15 @@ require_once 'config.php'; + function get_translations() { + $tr = array("en_US" => "English", + "ru_RU" => "Russian", + "fr_FR" => "French", + "zh_CN" => "Chinese"); + + return $tr; + } + if (ENABLE_TRANSLATIONS == true) { require_once "accept-to-gettext.php"; require_once "gettext/gettext.inc"; @@ -1377,6 +1386,8 @@ if (authenticate_user($link, $login, $password)) { $_POST["password"] = ""; + $_SESSION["language"] = $_POST["language"]; + header("Location: " . $_SERVER["REQUEST_URI"]); exit; diff --git a/login_form.php b/login_form.php index 55ad4b1a..46a7b084 100644 --- a/login_form.php +++ b/login_form.php @@ -50,6 +50,14 @@ window.onload = init; + + + +