Changes in setup to handle egw_ prefix in lang files

This commit is contained in:
Oscar Manuel Gómez Senovilla 2007-10-14 16:13:50 +00:00
parent b018b25a15
commit 7bbfae68c6
28 changed files with 6 additions and 3 deletions

View File

@ -16,6 +16,9 @@
define('MAX_MESSAGE_ID_LENGTH',128);
}
// Define prefix for langfiles (historically 'phpgw_')
define('EGW_LANGFILE_PREFIX', 'egw_');
class setup_translation
{
var $langarray = array();
@ -40,10 +43,10 @@
$lang = $ConfigLang;
}
$fn = '.' . SEP . 'lang' . SEP . 'phpgw_' . $lang . '.lang';
$fn = '.' . SEP . 'lang' . SEP . EGW_LANGFILE_PREFIX . $lang . '.lang';
if (!file_exists($fn))
{
$fn = '.' . SEP . 'lang' . SEP . 'phpgw_en.lang';
$fn = '.' . SEP . 'lang' . SEP . EGW_LANGFILE_PREFIX .'en.lang';
}
if (file_exists($fn))
{
@ -151,7 +154,7 @@
while(($line = fgets($f)) !== false)
{
list($lang,$language) = explode("\t",trim($line));
if ($lang && ($lf = @fopen("../phpgwapi/setup/phpgw_$lang.lang",'r')))
if ($lang && ($lf = @fopen("../phpgwapi/setup/" . EGW_LANGFILE_PREFIX . "$lang.lang",'r')))
{
while(($line = fgets($lf)) !== false)
{