J.P. Berry
by J.P. Berry
share this
« Back to the Blog

Supporting Multiple Languages in DirigoEdge

Supporting Multiple Languages in DirigoEdge

We have a developer in Denmark who's going to be using DirigoEdge for a website project. He asked about functionality to support multiple languages. This is our response:

DirigoEdge is built on .Net MVC, so if you plan on using the Views, you can just use local / global resources as usual (@Html.Resource(“ResourceName”).

If you plan on using the cms aspect (which we would recommend), then you could setup a content page for each language. For example : contact, contact_en, contact_ru, etc. Then, in the content viewmodel, you would just select back the correct page from the database, based on the language. I would set the language in the session, per user.

So if the language was Russian (in this example, “ru”)  you could modify the contentViewViewModel to do something like this :

string launguagePostFix = "_ru"; // Hardcoded for brevity
ThePage = context.ContentPages.Where(x => x.DisplayName == title + launguagePostFix).FirstOrDefault();
// Revert to default language if the language version doesn't exist
if (ThePage == null)
ThePage = context.ContentPages.Where(x => x.DisplayName == title).FirstOrDefault();

We’re using Edge on a few sites that have implemented multi-language support and we’d be happy to help anyone get setup. If you need consulting help, we do that, too.


Thank you for contacting us!

We'll be in touch!

Back Home ×