Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Dennis Milandt 190 posts 517 karma points
    Sep 24, 2019 @ 08:20
    Dennis Milandt

    Create all cultures on saving new node

    I have a website with three languages. Two of the languages use fallback to the properties on the first language, and all languages are mandatory.

    I would like it, so that when a new node is created, the editor can just fill out the node name for the first country and click Save and Publish, and then automatically create all three language versions, without having to swtich to each language and enter the node name in each language.

    I would like to do this the ContentService.Saving or ContentService.Saved event, but I have been unable to get the two additional language versions of the new node to be created.

    I have tried content.SetCultureName(content.Name, "xx-xx"); but it didn't seem to do anything. I have also tried content.CultureInfos.Add(...) but it didn't make a difference.

    How do I make sure that when a new node is saved for the first time, that all three language variants are created, and the node name from the first language is used for all variants, if they are not filled out already?

    Kind regards Dennis

  • Louis Ferreira 69 posts 265 karma points
    Mar 15, 2022 @ 08:32
    Louis Ferreira

    Did you find a solution to this? I am looking to do that same thing too

  • Dennis Milandt 190 posts 517 karma points
    Mar 15, 2022 @ 08:37
    Dennis Milandt

    Hey Louis,

    I honestly do not remember how I solved it, or if it was solved. I don't have access to the source code I was working on at the time, so I can't go take a look.

    I hope you find a way around it. If you do, please post your solution here :)

    ~ Dennis

Please Sign in or register to post replies

Write your reply to: