Copied to clipboard

Flag this post as spam?

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


  • Saied 349 posts 674 karma points
    Feb 26, 2016 @ 18:04
    Saied
    0

    Best way to pass culture to GetVortoValue?

    Hi, I got Vorto installed for 7.3 and I currently have this line:

    @Model.Content.GetVortoValue("homeourproducts")

    If I pass en to it, I get the English version and if I pass es to it, I get the Spanish version. I tried ignoring the culture argument and relying on the browser, but seems like it is not reliable. I had Spanish as my selected language in chrome, but it still showed the value in English.

    I guess what I most likely will end up doing is having a language switcher and depending on the language, pass the culture to GetVortoValue. What is the get and pass that value?

    I am assuming I will need to have some javascript on change to get the value and store it somewhere, but what is the best place to store it and then use that stored value in the call?

    I heard about using Session, but isn't that stored on the server-side and could hurt performance?

    Also, if I could get it to work with the browser only, it would be great, but do I have to have a translation for every dialect of spanish for example (es, es-ES, es-US, etc)?

    Thoughts?

    Thanks, Saied

Please Sign in or register to post replies

Write your reply to:

Draft