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.

[Display(
Name = "Page Title",
Description = "Page Title",
GroupName = SystemTabNames.Content,
Order = 100)]
[CultureSpecific]
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

More Posts

3 replies
    • Jon D Jones
      Jon D Jones says:

      The Epi will magically work based on the users culture/language. As soon as they set the culture, depending on your set-up will get saved to a cookie. EPiserver reads that preference and automatically returns the correct content for you, so you don’t need to do anything. Is that what you need?

      Reply

Trackbacks & Pingbacks

  1. […] my previous tutorial I wrote about How to enable multi languages within your website. Today I’m going to talk to you through how to create a language picker so your website users […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *