Copied to clipboard

Flag this post as spam?

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


  • Craig Cronin 304 posts 503 karma points
    Nov 03, 2014 @ 16:16
    Craig Cronin
    0

    Changing site culture at runtime?

    I'm currently using Matt Brailsfords Vorto language package in MVC and trying to work out the best way to implement a bilinqual language switcher?

    I've done this previously in Webforms but not sure the best approach in Umbraco MVC.  Any help would be appreciated.

  • Craig Cronin 304 posts 503 karma points
    Nov 05, 2014 @ 09:57
    Craig Cronin
    0

    Just in case this of any interest to anyone, but I've managed to get this working.

    1. Created a custom controller and inherited from Umbraco.Web.Mvc.RenderMvcController.  This function checks a cookie and switches the language.
    2. Created a new class MyApplication and inheritied from UmbracoApplication.
    3. Override the OnApplicationStarting method and hook up the new base controller.

    I've also then enabled additional actions on the controller for switching between languages.

  • Joshua D. Stewart 34 posts 84 karma points
    Mar 20, 2015 @ 16:24
    Joshua D. Stewart
    0

    Hi Craig,

    Do you have example code you could post on how you acheived this? Thanks in advance for your help.

  • Craig Cronin 304 posts 503 karma points
    Mar 20, 2015 @ 21:40
    Craig Cronin
    0

    Hi Joshua,

    Its a little too much to post on the forum, but send me an email at craigacronin at me.com and I'll send you some :)

  • Joshua D. Stewart 34 posts 84 karma points
    Mar 20, 2015 @ 21:56
    Joshua D. Stewart
    0

    Thanks, Craig. Email sent. I really appreciate the example code and quick response.

Please Sign in or register to post replies

Write your reply to:

Draft