Locales and translations in the Frontastic studio

There are 2 different ways that you can manage different languages for your sites in the Frontastic studioFrontastic studio - The interface you use to manage, build, and edit all areas of your project and commerce sites. Previously known as `backstage`. but these will have been decided when your project was set up. For more information, see the setting up a project article.

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. 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, page folderspage folders - A way of structuring the pages within a project and forms the URL structure – they can contain sub-folders. Known as `node` in code. or Frontastic componentsFrontastic components - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code.), by default everything is synced so if you don't want this to happen, please contact our Support team.

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 but you 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 setup:

  • Project 1 = English Website (en_GB)
  • Project 2 = Swiss Website (de_CH, fr_CH, it_CH) with a similar page folderpage folder - A way of structuring the pages within a project and forms the URL structure – they can contain sub-folders. Known as `node` in code. 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 Frontastic componentsFrontastic components - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code., the Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. settings 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 Frontastic componentsFrontastic components - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. should be translatable but it isn't, talk to your development team about adding that field to your <glossary:Frontastic component>> 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 <glossary:Frontastic component>> 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 <glossary:Frontastic component>> to open the settings panel and expand the Image section:

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

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

Then input a translation for each caption:

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 Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. schema. It'll never go to an alternative language that isn't the default:


Did this page help you?