Copied to clipboard

Flag this post as spam?

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


  • Mahender Singh 39 posts 170 karma points
    Jun 20, 2022 @ 11:43
    Mahender Singh
    0

    PublishedContentQuery result for Multi-lingual website

    Hi Team,

    I want to retrive all published Umbraco content in code culture specific. I used PublishedContentQuery using below mention code but I return default English culture.

      var node = _publishedContentQuery.Content(1299).Children.ToList();
    

    Could anyone please help me to get the content culture specific.

    Thanks in advance.

  • Johan Runsten 38 posts 276 karma points c-trib
    Jun 22, 2022 @ 08:20
    Johan Runsten
    0

    Hi!

    Try _publishedContentQuery.Content(1299).Children("your culture").ToList();

  • Mahender Singh 39 posts 170 karma points
    Jun 29, 2022 @ 05:05
    Mahender Singh
    1

    Thanks for reply Johan,

    I am using below mention code and it works for me

    _variationContextAccessor.VariationContext = new VariationContext("ms-sg");
    var node = _publishedContentQuery.Content(1299).Children.ToList();
    

    _publishedContentQuery.Content(1299).Children("your culture").ToList();

    is not working for me.

Please Sign in or register to post replies

Write your reply to:

Draft