- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
if ( ( $_GET [ "lang" ] ) || ( $_POST [ "lang" ] ) )
{
if ( ( $_GET [ "lang" ] == "de" ) || ( $_POST [ "lang" ] == "de" ) ) { include ( "../language/german_setup.php" ); $lang = "de"; }
if ( ( $_GET [ "lang" ] == "en" ) || ( $_POST [ "lang" ] == "en" ) ) { include ( "../language/english_setup.php" ); $lang = "en"; }
if ( ( $_GET [ "lang" ] == "nl" ) || ( $_POST [ "lang" ] == "nl" ) ) { include ( "../language/dutch_setup.php" ); $lang = "nl"; }
if ( ( $_GET [ "lang" ] == "it" ) || ( $_POST [ "lang" ] == "it" ) ) { include ( "../language/italian_setup.php" ); $lang = "it"; }
if ( ( $_GET [ "lang" ] == "es" ) || ( $_POST [ "lang" ] == "es" ) ) { include ( "../language/spanish_setup.php" ); $lang = "es"; }
if ( ( $_GET [ "lang" ] == "fa" ) || ( $_POST [ "lang" ] == "fa" ) ) { include ( "../language/farsi_setup.php" ); $lang = "fa"; }
if ( ( $_GET [ "lang" ] == "dk" ) || ( $_POST [ "lang" ] == "dk" ) ) { include ( "../language/danish_setup.php" ); $lang = "dk"; }
if ( ( $_GET [ "lang" ] == "fr" ) || ( $_POST [ "lang" ] == "fr" ) ) { include ( "../language/french_setup.php" ); $lang = "fr"; }
if ( ( $_GET [ "lang" ] == "tr" ) || ( $_POST [ "lang" ] == "tr" ) ) { include ( "../language/turkish_setup.php" ); $lang = "tr"; }
if ( ( $_GET [ "lang" ] == "hu" ) || ( $_POST [ "lang" ] == "hu" ) ) { include ( "../language/hungarian_setup.php" ); $lang = "hu"; }
if ( ( $_GET [ "lang" ] == "pt" ) || ( $_POST [ "lang" ] == "pt" ) ) { include ( "../language/portuguese_setup.php" ); $lang = "pt"; }
if ( ( $_GET [ "lang" ] == "he" ) || ( $_POST [ "lang" ] == "he" ) ) { include ( "../language/hebrew_setup.php" ); $lang = "he"; }
}
else
{
include ( "../language/german_setup.php" ); # include language vars
$lang = "de";
}
Из известного php web stat релиза 2009 в июле.
В первом попавшимся на глаза скрипте.
guest 03.02.2010 07:49 # +1
Узкие глаза
Отладка обернётся адом
Узкие глаза
Узкие глаза
Узкие глаза....
guest 03.02.2010 09:14 # 0
mrbig66 03.02.2010 10:54 # +6
-- Может POST?
-- Или нет, GET.
-- Хотя нет, давайте еще поищем в FILES.
-- А не лучше взять REQUEST?
-- Давайте еще в COOKIES глянем.
-- Тогда уж и в SESSION заглянем О_о. -- Схуяли?
%ля пестетс.
guest 03.02.2010 15:57 # 0
mrbig66 03.02.2010 16:38 # 0
Вдруг оно там ВНЕЗАПНО оказалось.
guest 03.02.2010 17:26 # 0
guest 06.02.2010 15:57 # 0
Переменная языка может таки и в окружении SERVER торчать :)
Главное правила прописать в .htaccess:
RewriteRule ^(en|ru|ua)/?$ / [QSA,E=LANG:$1]
А переменная, вот она: $_SERVER['REDIRECT_LANG'] (или подобное имя, в зависимости от настроек сервера).
Ну и при передаче www.govnokod.ru/en/ будете получать переменную со значением "en"
guest 03.02.2010 11:07 # 0
paranoid 03.02.2010 11:42 # 0
vov4ik 03.02.2010 11:46 # 0
guest 05.02.2010 14:27 # 0
vov4ik 05.02.2010 15:17 # 0
http://www.php-web-statistik.de/download-deutsch.html
HyperGeek 03.02.2010 12:02 # 0
mrbig66 03.02.2010 13:51 # −3
danxill 04.02.2010 06:30 # −2
bkezArB 25.08.2021 01:52 # 0