【发布时间】:2012-10-14 12:53:03
【问题描述】:
我的问题看起来和这个Is it possible to put variables inside config files?几乎一样
我有一个控制语言的配置文件。我也有一个显示反馈的反馈 div。
现在我想分配这样的反馈:
$smarty->assign('feedback', 'the_age_of_user_' . $user->name . '_is_changed_to_' . $user->age . '_years');
nl.conf
the_age_of_user_%s_is_changed_to_%s_years = De leeftijd van gebruiker %s gewijzigd naar %s jaar
zh.conf
the_age_of_user_%s_is_changed_to_%s_years = The age of user %s is changed to %s years
有谁知道我如何做到这一点?或者有没有更好的解决方案将变量分配给配置文件?
【问题讨论】:
标签: php smarty variable-assignment configuration-files