3 min read

Localising Your Craft CMS Website: A Step-by-Step Guide

Shape April 2022 HR 188
Contents
Updated on 02 Apr 2024

Craft CMS is our number 1️⃣ for building websites.

One of these reasons is because it allows us to localise our websites. Localisation allows you to create a more inclusive and personalised experience for your visitors, ensuring that your content speaks their language.

I’m going to run you through the process of localising your Craft CMS website and share some best practices along the way.

Understanding Localisation in Craft CMS

Before diving into the nitty-gritty, let's first understand what localisation means in the context of Craft CMS.

Localisation involves adapting your website's content and design to suit different languages, and regions. It goes beyond simply translating text; it encompasses factors such as date formats, currencies, and more. 🔥

Shape April 2022 HR 96

Setting Up Multi-Language Content

Craft CMS makes it easy to set up multi-language content, allowing you to reach a broader audience. Here are the steps to follow:

1️⃣ Creating your sites / locales

First things first, you need to decide which languages you want to set up. Once this is determined, create a new site in the Craft CMS control panel for each of your chosen languages.

2️⃣ Update your sections

Once you have set up your sites, you will need to enable these sites per Section. You will need to fill out the Entry URI format and Template field accordingly.

3️⃣ Choose your translatable fields

By default, Craft CMS fields are not translatable, so you need to go into each field and enable this. From the Translation Method field in the field settings, select ‘Translate for each site. This then means that you can change the content of this field for each site. Obviously, you can pick and choose here, so if there are some fields that need to hold the same content across all sites, there is no need to change this setting.

4️⃣ Update permissions

Ensure that all users with access to the Craft CMS Control Panel have access to the new sites that have been created.

Once you have performed these steps, you should be up and running!

Shape April 2022 HR 34

Best Practices for Localisation in Craft CMS

To ensure a smooth localisation process, consider the following best practices:

🌐 Plan your content structure

Before starting to translate content, plan your content structure carefully. Determine how different languages will be organised and how you'll handle any language-specific content.

🔤 Use translation files

Craft CMS allows you to use translation files to store your translations separately, in a PHP config file. This makes it easier to manage and update translations, especially when working with a large number of strings.

🗓️ Handle date and time formats

Take into account the regional differences in date and time formats. Craft CMS provides powerful date and time formatting options, allowing you to tailor the display of dates and times based on the user's locale.

💸 Consider currency and number format

If your website deals with currencies or numerical data, be mindful of how these are formatted across different locales. Craft CMS provides tools to handle currency and number formatting, making it easier to present these details accurately.

🌍 Use professional translation services

While automatic translation tools can be useful, for the best results, consider using professional translation services. They can ensure accurate translations that capture the nuances of different languages.

📱 Make the most of Craft CMS plugins

There are some fantastic Craft CMS plugins which help to really enhance localised sites. One of our favourites is ‘Site Copy X’ by Gold Interactive. This allows you to perform a full copy of a site's entry over to another site. So if you are happy with the content structure on one site and want to move this across, you can do just that with Site Copy X in a few clicks!

By following these best practices, you can create a localised Craft CMS website that speaks to your international audience with finesse! 🌍

I've been at Shape for around 8 years now. I bagged a couple of weeks of work experience at the end of my first year at Salford Uni and from then on, well what can I say, they couldn't get enough of me.