nathanwoulfe / tabulate

Manage large datasets in Umbraco, without losing your sanity
7 stars 3 forks source link

Tabulate multilingual table #42

Closed NancyNguyenProworks closed 10 months ago

NancyNguyenProworks commented 1 year ago

Hello Nathan,

I implemented a Tabulate table on an Umbraco Cloud project, which supports multi-languages. However, I have noticed that when I publish an English translation of a page, both the Spanish and English versions of the page show up in English. Conversely, when I publish the Spanish version of the same page, both the English and Spanish versions are displayed in Spanish. My current umbraco version is 8.18.8 and the tabulate version currently installed from my Nuget packages is Tabulate.Umbraco version 4. The Tabulate table is implemented within a block. Are you familiar with any multilingual problems with Tabulate like this?

nathanwoulfe commented 1 year ago

Hey @NancyNguyenProworks

I haven't heard of any issues using Tabulate with variant content, but also haven't tried it either... Sounds like the value converter may not be respecting the published culture. I'll try to find some time to have a closer look.

NancyNguyenProworks commented 1 year ago

Hi @nathanwoulfe,

I hope you're doing well. I wanted to check in about any progress or updates you might have. I appreciate your time and expertise in addressing this matter, and I'm eager to hear about any insights or developments you've come across. Thank you for your attention to this issue, and I look forward to your response.

Hey @NancyNguyenProworks

I haven't heard of any issues using Tabulate with variant content, but also haven't tried it either... Sounds like the value converter may not be respecting the published culture. I'll try to find some time to have a closer look.

NancyNguyenProworks commented 1 year ago

Hello @nathanwoulfe,

I hope this message finds you well. I wanted to kindly follow up on my previous communication from a few weeks ago regarding the tabulate. I understand that you may be busy, but I would greatly appreciate it if you could provide me with an update on the status if you have looked at the issue. Thank you for your attention to this matter, and I look forward to hearing from you soon.

nathanwoulfe commented 1 year ago

Hi @NancyNguyenProworks

Had a look at this today, I can't reproduce any issues - on Umbraco 8.18.8, with English and French, I can render a Tabulate instance in a Block List and display the correct content when switching languages. This was done without using partials for the block, instead rendering directly in the view:

<article>
    @{
        var blocks = Model.Blocklist.Select(x => x.Content).OfType<TabulateBlock>();

        foreach (var block in blocks)
        {
         <table>
            <tr>
                @foreach(var h in block.Table.Headers) {
                    <th>
                        @h.Name (@h.Type)
                    </th>
                }   
            </tr>

            @foreach(var row in block.Table.Rows) {
                <tr>
                    @foreach (var cell in row.Cells) {
                        <td>@cell</td>    
                    }
                </tr>
            }
        </table>
        }
    }
</article>