How To Enable Multiple Languages In Your Episerver Website

In a lot of big corporate companies' websites, the client will have customers all over the world.  This will usually mean you will need to build your project with multi-language support.  In Episerver, working with different languages is very simple.  This post is the first in a series of articles that will teach you how to enable multiple languages in your website and provide all the code you need to get started.

Selecting The Languages

Log-into the Episerver admin and go to the Manage Website Languages page, enable the languages you want to work with. manage_website_languages Click on the language you want to enable and check the enable checkbox and hit save. manage_website_languages_adding

Adding Data Into Your Pages

So, now you have language enabled on your site, the next thing is to add some multi language content.  In your page and block type definitions, you will need to decorate any property that you want to be multi lingual with the [CultureSpecific] attribute.
            Name = "Page Title",
            Description = "Page Title",
            GroupName = SystemTabNames.Content,
            Order = 100)]
        public virtual string PageTitle { get; set; }

Adding Data Into The Page

Ok, so now you have languages enabled and a way to store that data in Episerver.  Our next task is to create a translation page.  Go into Episerver editor and click on the Toggle navigation pane button to see the page tree episerver_editor Click the 'Sites' tab and double click on the language you want to create. episerver_editor_multi_language Now, if you select a page, you should see a Translation warning.  If you hit the translate button on the right, you can then add content in for the language you have specified. The fields you can edit will be determined by which page properties you've set the [CultureSpecific] attributes on. episerver_translate

To Enable The Translate ButtonGlobally

Select your root page in the editor tree, on the pages properties select Tools -> Manage Languages episerver_enable_languages Select Change episerver_enable_languages_button Then enable the language you want to be available to editors and hit Save. episerver_enable_languages_select On my current site, doing that was enough to allow content editors to add in multi language content. If you find that only your root page is configurable, you will need to inherit all your child pages with the new language configuration.  Go to the page you have defined as your Start Page -> Tools -> Manage Languages (like we did for the root), however, this time you should see a check-box called "Inherit Settings From the Parent Page" enable, then you should be good to go.

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

Back to top
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-35662136-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + ''; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();