Computer Magic Logo

Sunday, August 9, 2015

Published by Aristotelis Pitaridis

Let’s create our template which is going to be very simple but it will contain all the elements we need in order to demonstrate how to make a Multilanguage web site. We open the Page Template from the Settings section and we replace its contents with the following code.

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    Layout = null;

<!DOCTYPE html>
<html xmlns="">
    <meta name="description" content="@Umbraco.Field("description")">
    <meta name="keywords" content="@Umbraco.Field("keywords")">
	<link href="/css/Stylesheet.css" rel="stylesheet" />
    <div id="Container">
            <nav id="Menu">
                <a href="/en/home">Home</a>
                <a href="/en/company">Company</a>
            <nav id="Lanugages">
                <a href="#">Greek</a>
                <a href="#">English</a>
        <div id="Body">
        <div id="Footer">
            Sample multilanguage site

In this template we have the three fields for the SEO which are the Title, the Description and the Keywords and we also added the Page Text which will be the contents of the page.

We have only two pages so that we will keep it as simple as possible. The links to each page are static now but we will make them dynamic later.

We have two links which will be our language selector. At the moment they do nothing but we will fix it as well later.

We also have a footer with a static text in order to demonstrate how to make the static texts Multilanguage.

In the Template we defined a stylesheet file that we have to create and the contents for this file is the following:

#Container { 
    width: 720px;
    margin: auto;
#Body {
    padding: 20px 0;
    clear: both;
#Footer {
    background-color: gray;
    color: white;
    padding: 20px;
    text-align: center;
nav {
    margin: 20px  0;
nav a {
    padding: 10px;
    background-color: gray;
    color: white;
    text-decoration: none;
nav a:hover {
    background-color: lightgray;
    color: gray;
#Menu {
    float: left;
#Lanugages {
    float: right;