Multilingual Help
# help-with-umbraco
b
Hello everyone i'm trying to add second language to my site,document types works fine i already setup cultures & hostnames,but when i try to display listview items i can't see in any language at all. In the image i have card components like this but when i add allow vary by culture to discoverCardComponent (child of the listview) Partial returns nothing just empty. Here is how i call it in my Homepage.cshtml
Copy code
html
<div class="discoverCardContainer">
    @await Html.PartialAsync("components/discoverCard")
</div>
And here is my Partials/discoverCard.cshtml
Copy code
html
@using Umbraco.Cms.Core.Models.PublishedContent;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
    var page = Umbraco.Content(1065);
    var selection = page.ChildrenOfType("AllDiscoverCardComponent").FirstOrDefault();
    var all = selection.Children("discoverCardComponent").ToList();
}

@if (all == null || all.Count == 0)
{
    <p>No data to display</p>
}
else
    @foreach (var item in all)
    {
        <div class="discoverCard">
            @{
                var itemname = item.Value("packageName");
                var price = item.Value("price");
                var cardIcon = item.Value<IPublishedContent>("icon")?.Url();
                var color = item.Value("color");
            }
            <div class="discoverCardTop" style="background-color: @color;">
                <div class="cardIconContainer"><img class="discoverCardTopIcon" src="@cardIcon" alt=""></div>
                <div class="discoverCardTopTextContainer">
                    <h3>@itemname</h3>
                </div>
            </div>
            <div class="discoverCardBottom">
                <a role="button" href="@item.Value("link")" class="discoverDetailsButton">Details</a>
            </div>
        </div>
    }
https://cdn.discordapp.com/attachments/1290205365669204069/1290205365962539028/image.png?ex=66fb9ce2&is=66fa4b62&hm=71ca66c1a620c66fa38d918b835cfa4f02d6243e95f011740c6758efbedc404f&
2 Views