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.
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:
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...]
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.
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:
And created an ApplicationEventHandle, for setting the page Culture:
On the page with these settings, I have two problems:
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...]
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.
I would kindly ask for your help.
Hi. i have same issue, do you manage to solve it? Thanks
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...
is working on a reply...