对于我正在使用Sitecore 6.5的项目。这是一个多语言项目。我想在程序代码中添加项目 预定义语言,例如荷兰语。
我搜索了整个互联网,但我找不到正确的方法。有谁知道我怎么解决这个问题?
非常感谢。
的Jordy
答案 0 :(得分:8)
第一次在荷兰语中获得父项:
Language languageDutch=Language.Parse("nl-nl");
////parentItemId is the item under you want to create child
Item parentItem=Sitecore.Context.Item.GetItem(parentItemId, Language languageDutch)
在荷兰语中创建子项目之后:
parentItem.AddItem("child item name",TemplateId)
。