Copied to clipboard

Flag this post as spam?

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


  • Bor 2 posts 72 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 25 posts 165 karma points
    Sep 18, 2020 @ 04:26
    Nalysa
    0

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

Please Sign in or register to post replies

Write your reply to:

Draft