【发布时间】:2019-02-26 12:22:31
【问题描述】:
我已将 Silverstripe 网站从 3.x 升级到 4.x。
3.x 使用多语言进行翻译,现在在 4.x 中,我已将多语言替换为 Silverstripe Fluent 模块,但我想知道如何将数据(翻译后的字段)导入新系统并使用 Fluent。
更准确地说,我想以编程方式使用翻译后的数据更新 SiteTree_Localised 表,例如
$record = SiteTree_Localised::get()->filter(array(
'RecordID' => 16,
'Locale' => 'de_DE'
))->first();
$record->Title = 'Some title';
$record->write();
但这不起作用,因为 SiteTree_Localised 对象不存在?如何更新上述记录?
【问题讨论】:
标签: php silverstripe silverstripe-4