Copied to clipboard

Flag this post as spam?

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


  • Steve Borg 28 posts 99 karma points
    Apr 13, 2017 @ 06:42
    Steve Borg
    0

    Merchello with 1:1 Multi-language site

    Hi,

    I am looking into creating a 1:1 multi-language site which also uses Merchello. Is there any way that I can retrieve the product properties in the other languages? I realise I can use: product.SpecifyCulture(languageISO); but that seems to set the culture for the product itself and I need to unset at the end of the partial view which isn't really going to work too well.

    Thank you,

    Best regards,

    Steve

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Apr 13, 2017 @ 15:28
    Rusty Swayne
    0

    Hi Steve,

    You should not need to use product.SpecifyCulture if the language is set via the Umbraco back office (e.g. typical multi-lingual trees). Is that not working?

  • Steve Borg 28 posts 99 karma points
    Apr 24, 2017 @ 18:35
    Steve Borg
    0

    Hi Rusty,

    Thanks for your reply. I got back from my Easter holiday and I have created a standard multi-national site as far as I can tell. This is not what I want in the long term but I thought I'd go back to basics to get that working first.

    I have the site in English and French. The UK site is set with a culture and hostnames of http://localhost/en and language en-GB. The FR site is set with a culture and hostnames of http://localhost/fr and language of fr-FR.

    My standard English and French pages are showing the correct body text. I am using extended content in the products and have set the English and French body text accordingly. I have set the merchello.config to:

    route cultureName="en-GB" productSlugPrefix="en" route cultureName="fr-FR" productSlugPrefix="fr"

    I have one product. I set the URL Slug for the French version of the extended product data in the render tab to frtestproduct and the English version to testproduct.

    When I go to localhost/en/testproduct I see the product page in English text. When I go to localhost/fr/frtestproduct (or localhost/fr/testproduct) I see the product page in English text and not French.

    Am I missing something / doing something wrong / misunderstood how this is meant to work?

    Best regards,

    Steve

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Apr 26, 2017 @ 17:25
    Rusty Swayne
    0

    Hey Steve - does it work if you do use the SpecifyCulture method?

    I just had a quick look and it appears that a caching revision may be at fault here - not confirmed but it needs to be tested.

    I added an issue here http://issues.merchello.com/youtrack/issue/M-1317

  • Steve Borg 28 posts 99 karma points
    May 02, 2017 @ 14:26
    Steve Borg
    0

    Hi Rusty,

    I've been holding off coming back with an answer until I knew what was going on. It does work with SpecifyCulture but setting that is causing all kinds of problems.

    My content finder is working but I can see that having to set SpecifyCulture in my product view is having odd effects on the content finder itself. Ideally what I want is for MerchelloHelper().TypedProductContentBySlug(slug); to be able to accept a culture and for it only to return the product if there is a slug name that matches in that culture. At the moment I can add the English product name to the end of my French Url and the content finder will return the product even though that product slug is not valid in that culture.

    I'll keep working on it. I have removed the Merchello content finder from the content finder collection to ensure that is not conflicting. Incidentally, we think there is an issue with the PrepareSlug function in that it appears to remove the prefix throughout the slug and not just from the beginning. e.g. /fr/test-product-french seems to be returning test-product-ench.

    Cheers,

    Steve

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 04, 2017 @ 13:21
    Rusty Swayne
    0

    Hey Steve - sorry for the late reply. I'm out of town this week.

    I like the idea of having the TypedContentProductBySlug accept the culture. The issue is going to be somewhat complex to completely fix now that IProductContent is cached since any modification will changed the cached version. Maybe doing something like they do in Umbraco's new caching stuff where the object is cloned on the way in and out would help here. Alternatively proxies could be set up and cached for each culture specified - which might be the easiest change until we can do a more comprehensive refactoring in a later major version.

    I'll have to look again, but I think the extension method AsProductContent may be setting the culture to the default culture as well. This might need an overload that accepts the culture.

  • skp 12 posts 80 karma points
    Dec 17, 2018 @ 04:52
    skp
    1

    Hi Rusty / Steve,

    I am new in Merchello, How to implement multi languages and Multiple currencies in Merchello, Is this possible? please provide me some code samples. I am stuck on this.

  • krzakivan 26 posts 92 karma points
    Feb 10, 2019 @ 13:58
    krzakivan
    0

    Hi guys ,

    Did you figure out how to implement multiple languages to merchello ? I just cant ..

Please Sign in or register to post replies

Write your reply to:

Draft