Copied to clipboard

Flag this post as spam?

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


  • Bor 12 posts 125 karma points
    Jul 08, 2019 @ 09:08
    Bor
    0

    Issue with products translations

    Hi.

    We are building our first web shop in Merchello on top of FastTrack. The page must run in multiple languages. The shop is built in Umbraco v7.14.0, Merchello v2.7.1 and FastTrack package v2.7.0.

    For testing porpuses, we built a page with two root nodes one with English language (en-US) and one with Slovenian (sl-SI), both nodes are a copy of FastTrack store. And created some product with content in both languages.

    In merchello.config we set:

    <contentFinderCulture>
       <route cultureName="sl-SI" productSlugPrefix="si" />
       <route cultureName="en-US" productSlugPrefix="en" />
    </contentFinderCulture>
    

    And created an ApplicationEventHandle, for setting the page Culture:

    public class Startup : ApplicationEventHandler {
      protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) {
        umbracoApplication.BeginRequest += UmbracoApplication_BeginRequest;
      }
      private void UmbracoApplication_BeginRequest(object sender, EventArgs e) {
        var lng = HttpContext.Current.Request.Path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
        if (string.IsNullOrEmpty(lng)) return;
        CultureInfo cInfo = null;
        switch (lng) {
           case "en": cInfo = new CultureInfo("en-US"); break;
           default: cInfo = new CultureInfo("sl-SI"); break;
        }
        System.Threading.Thread.CurrentThread.CurrentUICulture = cInfo;
        System.Threading.Thread.CurrentThread.CurrentCulture = cInfo;
      }
    }
    

    On the page with these settings, I have two problems:

    1. When for example on the store page the product renders, they always display the Slovenian content (with Slovenian product links) even on the English site.... [other content is ok...]

    2. The product displays only on English link, on Slovenian it shows page not found. But even on English link, it shows the content in Slovenian. enter image description here

    I would kindly ask for your help.

  • Nalysa 48 posts 269 karma points
    Sep 18, 2020 @ 04:26
    Nalysa
    0

    Hi. i have same issue, do you manage to solve it? Thanks

  • Bor 12 posts 125 karma points
    Jul 07, 2021 @ 13:00
    Bor
    100

    Hi, sorry for the late response. Yes the problem is Merchello product cache.

    Check this:

    https://github.com/Merchello/Merchello/commit/9036f4c98f2bfc829422de5321593c24430106d4

    https://github.com/Merchello/Merchello/commit/5b2d33438b4f35ea284ffa5bdb7fd885a67fe25a

    Merchello will stay in Umbraco 7 and is no longer supported, so it is probabpy better to move on something else...

Please Sign in or register to post replies

Write your reply to:

Draft