Working with locales

As a Frontend Manager, there are 2 different ways that you can manage different languages for your sites but these will have been decided when your project was set up. 

Firstly, you can have multiple projects set up, each 1 with its own language. This means that you'll usually have to write each language separately for each project. Your developers may have put some logic into the code that could minimize this but you'll need to talk to them as it varies from customer to customer. The Frontastic team can also set up a sync feature which means you don't have to rebuild certain things for each locale (for example, nodes or Tastics), by default everything is synced so if you don't want this to happen, please contact our Support team if your developers haven't done this already.

The other way to do this is to use a single project with multiple languages. This way, the structure and pages are shared across all languages, you just need to input the different translations if you're not using an automatic translation. If you want to show different pages for different locales though, you'll need to talk to your Development team to build the overrides into your code.

You could also combine both setups if you'd like to. Below is an example of that set up:

  • Project 1 = English Website (en_GB)
  • Project 2 = Swiss Website (de_CHfr_CHit_CH) with the same node tree as the English website, but different pages in three different languages

Managing different languages

Some copy will be automatically translated, but it's dependent on what your Development team has enabled or not. 

In certain Tastics, the Tastic configuration will have certain fields that are translatable and it's here that you'll need to add the different copy for each language.

If you think a certain Tastic should be translatable but it isn't, talk to your Development team about adding that field to your Tastic schema.

Let's look at an example of how you would edit text for different locales within the same project. Here, we'll add an ALT text to an image banner Tastic that's only in the default language, plus we'll add a caption to our image for each locale.

Firstly, click on the image banner Tastic to open the configuration and expand the image section:

Working with locales gif

Then we input the ALT title to the default language. In this example, German is the default language (the first field) but we can still write in whichever language we like:

Inputting an alt image title gif

By leaving all the other languages blank, this default one will pull through to all locales.

We then input a translation for each caption:

Using locales captions gif

You can see that as you click on each, it shows you the default for the caption before you enter the translation.

These captions will now display to your user depending on their locale. If you remove the translation, it will revert to the default caption. If you remove the caption altogether, it will show as empty unless a caption has been set in the Tastic schema. It'll never go to an alternative language that isn't the default:

Using locales example gif

‹ Back to article list

Next article ›

Creating anchor points

Still need help? Contact us Contact us