适应数据库连接的多语言脚本


multilanguage script adapting to database connection

我在我的网站中使用了一个非常好的多语言脚本。

http://www.bitrepository.com/php-how-to-add-multi-language-support-to-a-website.html

但不幸的是,我有一个问题:

我需要操作语言页面(languages/lang.en.php)内的信息,从我的后台进行编辑,而不是转到语言页面并从那里填写。

例如,可以从

文件柜languages/lang.en.php发出回声?

我尝试但没有成功,我喜欢将语言页面传达到我的数据库。

试图看看我是否可以在语言文件中回显这部分代码:

$lang['PAGE_TITLE'] = '我的网站页面标题';

更改为

$lang['PAGE_TITLE'] = '';但是不起作用,看起来这只能使用 html 标签。

如果在 PHP 页面中将标题设置为:

<title><?php echo $lang['PAGE_TITLE']; ?></title>
//change this to
<title><?php echo $lang-pagetitle; ?></title>
//and at the top of the document
$lang-pagetitle = $lang['PAGE_TITLE'];
//and when it needs to be changed, put this above where the title is echoed, 
//after where $lang-pagetitle is initially defined:
if(whatever condition) {
$lang-pagetitle = "something else";
}