View Single Post
Old 08-27-2004, 04:32 AM   #5
-ding-dong-
Green Mole
 
Join Date: Aug 2004
Posts: 6
Hi Charter,

I added you lines and figured out that the path is ok.

After debugging I got the following situation:

Language "en" is set und the file is there. No Problems.

//includes language file
if (is_file("$relative_script_path/locales/$phpdig_language-language.php")) {
include "$relative_script_path/locales/$phpdig_language-language.php";
}
elseif (is_file("$relative_script_path/locales/en-language.php")) {
include "$relative_script_path/locales/en-language.php";
}
else {
die("Unable to select language pack.\n");
}

The language file contains the requested strings. No problems.

$phpdig_mess = array (
'choose_temp' =>'Choose a template',
'select_site' =>'Select a site to search',
...
'w_begin' =>'and operator',
'w_whole' =>'exact phrase',
'w_part' =>'or operator',

BUT at the end in function

function phpdigMsg($string='') {
global $phpdig_mess;
if (isset($phpdig_mess[$string])) {
return nl2br($phpdig_mess[$string]);
}
else {
return ucfirst($string);
}
}

"$phpdig_mess" is NULL and I run into "ucfirst".

I tried to change the "include" to the "required" function to include the language.php but I got still the same wrong results.

Any ideas why $phpdig_mess is NULL after including the right file?

Thanks for your help.
-ding-dong- is offline   Reply With Quote