API
Version 7.x > API > Creating multilingual treenodes and documents View modes: 
User avatar
Member
Member
ap - 1/17/2013 12:32:06 PM
   
Creating multilingual treenodes and documents
hello. I'm using the api to create documents within the tree. I'm able to do so easily using:
TreeNode newNode = TreeNode.New("custom.MyClass", tree);
newNode.DocumentName = "My English Title";
newNode.DocumentCulture = "en_US";

my question is how can i create a duplicate document in another culture (when the DocumentName's don't match, but are actually the same document):
TreeNode newNode = TreeNode.New("custom.MyClass", tree);
newNode.DocumentName = "My Spanish Title";
newNode.DocumentCulture = "es_ES";

is there some parameter that i need to set?
thanks.
AP

User avatar
Member
Member
ap - 1/17/2013 3:37:34 PM
   
RE:Creating multilingual treenodes and documents
just to append to my previous post:

a better multilingual example would be:
TreeNode newNode = TreeNode.New("custom.MyClass", tree);
newNode.DocumentName = "我想拥有自己的云";
newNode.DocumentCulture = "zh-CN";

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/18/2013 2:04:15 AM
   
RE:Creating multilingual treenodes and documents
Hi,

Please see the documentation and the API examples and there you can see that you can easily use the InsertAsNewCultureVersion method.

Best regards,
Juraj Ondrus