|
|
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo
|
|
[Modification] Problem with 'Two languaged forum' |
Autor |
Wiadomość |
evilmc

Posty: 289
|
Wysłany: 12-09-2011, 18:22 [Modification] Problem with 'Two languaged forum'
|
|
|
Cytat: | maminowiec wrote:
Nostry,
profile.php
Znajdź
Kod: | require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_profile.' . $phpEx); |
zamień na
Kod: | if(!$userdata['session_logged_in']){
$user_host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$user_from = end(explode('.',$user_host));
$user_lang = ( $user_from == 'pl' ) ? 'polish' : 'english';
require($phpbb_root_path . 'language/lang_' . $user_lang . '/lang_profile.' . $phpEx);
}
else
{
require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_profile.' . $phpEx);
} |
includes/functions.php
znajdź
Kod: | include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); |
zamień na
Kod: | if(!$userdata['session_logged_in']){
$user_host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$user_from = end(explode('.',$user_host));
$user_lang = ( $user_from == 'pl' ) ? 'polish' : 'english';
include($phpbb_root_path . 'language/lang_' . $user_lang . '/lang_main.' . $phpEx);
}
else
{
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
} |
|
I change this code on my forum, but now when I logout, my forum display english...I have 3 language on forum: Serbian, English and Polish
I change this line for Serbian lang:
Kod: | $user_lang = ( $user_from == 'sr' ) ? 'serbian' : 'english'; |
and not working....my site adress is: www.serbian-fm.net
and my lang_main.php for serbian is:
Kod: | setlocale(LC_ALL, 'sr');
@setlocale(LC_ALL, 'sr_YU.ISO8859-5', 'sr_YU.ISO8859-2', 'sr_YU@cyrillic.UTF-8', 'sr', 'serbian', 'sr_CS', 'sr_CS.UTF-8', 'sr_YU.UTF-8');
$lang['ENCODING'] = 'UTF-8';
$lang['DIRECTION'] = 'ltr';
$lang['DATE_FORMAT'] = 'd M Y'; |
Help!
Bojan |
_________________ Looptroop - Bandit Queen |
|
|
|
 |
Gadatliwa Kasia
|
|
|
|
Woytec

Pomógł: 2596 razy Posty: 7676
|
Wysłany: 13-09-2011, 15:02
|
|
|
What is name of serbian language directory (in /languages/)? |
|
|
|
 |
evilmc

Posty: 289
|
Wysłany: 14-09-2011, 01:27
|
|
|
Woytec napisał/a: | What is name of serbian language directory (in /languages/)? |
lang_english, lang_polish, lang_serbian |
_________________ Looptroop - Bandit Queen |
|
|
|
 |
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Możesz załączać pliki na tym forum Możesz ściągać załączniki na tym forum
|
Dodaj temat do Ulubionych Wersja do druku
|
Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!
Powered by phpBB modified by Przemo © 2003 phpBB
|