I had already tried that but it didn't work because I had only created the node in the "it" culture.
When I tried to save the node manually in the backend, I got the message that it has to be in the default language first.
After I created a node in "de" and then used your code, it worked perfectly!
contentservice saveandpublish additional culture
Hi,
I have a node published in the default culture ("de").
How can I publish this node in an additional culture ("it")?
My aproach is, to first get the node using its id:
I than set a value in the additional culture:
Finally I save & publish setting the additional culture:
In the backend the node is still greyed out.
Can anyone help?
Thanks
Probably a stupid question; is
'it'
enabled as a culture in the settings section?Hi David,
thanks for your reply.
I have these language settings:
Regards
I thought it would be a stupid question, but it's always worth checking the basics.
Hi,
you might also need to set the culture name for the node
e.g
Hi Kevin,
that did the trick!
I had already tried that but it didn't work because I had only created the node in the "it" culture. When I tried to save the node manually in the backend, I got the message that it has to be in the default language first. After I created a node in "de" and then used your code, it worked perfectly!
Many thanks for your help!
Next stupid question but is the course's DocType set to vary by culture along with the
headline
property?Also try this:
Reading the IContent API docs, it looks like you might need to call this for the culture to exists.
I'm looking at Umbraco 10. Always go with what Kevin says.
Many thanks David.
I will keep that in mind for when I move on to Umbraco 10!
Thanks for your help. Have a nice day.
is working on a reply...