1<?php
2// This file is part of BOINC.
3// http://boinc.berkeley.edu
4// Copyright (C) 2016 University of California
5//
6// BOINC is free software; you can redistribute it and/or modify it
7// under the terms of the GNU Lesser General Public License
8// as published by the Free Software Foundation,
9// either version 3 of the License, or (at your option) any later version.
10//
11// BOINC is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14// See the GNU Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public License
17// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
18
19require_once("../inc/util.inc");
20require_once("../inc/translation.inc");
21
22$languages = get_supported_languages();
23$lang = sanitize_tags(get_str("lang", true));
24
25if (!in_array($lang, $languages) && $lang!="auto" && $lang!="en") {
26    echo "Language $lang is not supported";
27} else {
28    send_cookie('lang', $lang, true);
29    header('Location: index.php');
30}
31?>
32