Hi, I'm using latest vrsion of PHP Address Book, is there any way to force single language (not English) on site , no matter what is language of browser, or at least put a dropdown menu for changing language?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm using latest vrsion of PHP Address Book, is there any way to force
single language (not English) on site , no matter what is language of
browser, or at least put a dropdown menu for changing language?
Actualy yes, and in latest version (8.2.5.1) there is no $lang or $language option, this is content of config.php file:
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.db.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.user.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.sso.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.mail.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.guess.php";
Nothing, I have set $lang="de"; and language hasn't changed from english nor in tha firefox, nor IE, nor Chrome, I have allso reset server (turnkey Lamp in local network).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm using latest vrsion of PHP Address Book, is there any way to force single language (not English) on site , no matter what is language of browser, or at least put a dropdown menu for changing language?
Hi,
Did you have a look at the "config.php" files? There is a "$lang" oder
"$language" option.
Regards O.
2014-01-31 knjigor knjigor@users.sf.net:
Actualy yes, and in latest version (8.2.5.1) there is no $lang or $language option, this is content of config.php file:
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.db.php";include dirname(FILE).DIRECTORY_SEPARATOR."cfg.user.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.sso.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.mail.php";
include dirname(FILE).DIRECTORY_SEPARATOR."cfg.guess.php";
// Page access configuration
$page_ext = ".php";
//
// Select the columns displayed in "index.php":
$disp_cols
= array( "select"
, "photo"
// , "lastname"
// , "firstname"
, "last_first"
, "address"
, "all_emails"
// , "email"
, "all_phones"
// , "telephone"
// , "home"
// , "mobile"
// , "work"
// , "fax"
, "edit"
, "details"
);
// Enable quick adding of unstructured addresses
$quickadd = true;
// Don't display groups
$nogroups = false;
// Disable all "edit/create" actions
$read_only = false;
// Enable group administration pages
$public_group_edit = true;
// Disable the AJAX-Mode with "false"
$use_ajax = true;
// Enable beta fetures, not recommended for production.
$beta_features = false;
// View e-mail addresses as images
$mail_as_image = false;
// Change the location of the images (e.g. a CDN Source)
$url_images = "";
// Disable HTTP-Compression with 0
$compression_level = 2;
?>
Set in config.php
$lang = "en";
and see what happens.
Allso looked in all config files, no trace of $lang or $language param.
Nothing, I have set $lang="de"; and language hasn't changed from english nor in tha firefox, nor IE, nor Chrome, I have allso reset server (turnkey Lamp in local network).
Ok, this is strange, i have instaled 7.0.0 version and every thing works as it should. Can't see why latest version doesnt work.
It isn't actualy latest version, nothing from version 8.0 doesn't work, and in version 7 I can't settup ip login.
I have found solution, in file include/translations.inc.php i have set $choose_lang = true; and commented following code
if(getPref('lang') != NULL) {
$lang = getPref('lang');
} else {
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$lang = $trans->getBestAcceptLang($_SERVER['HTTP_ACCEPT_LANGUAGE']);
} else {
$lang = $trans->getBestAcceptLang(array());
}
}
I know that this isn't right way but it has solved my problem.