Localization

In today's increasingly globalized world, foreign markets are becoming more and more important. As you create content for these markets, you may end up needing to translate it into multiple languages. This process of translating and adapting is called localization, while specific regions are known as locales.

This article provides an overview of working with locales after they've already been set up for a space. You'll need help from your development team to get them enabled for your project. For a more detailed guide on locales and how to set them up, see our developer documentation.

Working with locales

NOTE: You need to have administrator permissions to add locales to a space. 

Generally speaking, locales are language-region pairs. They are used for sharing content with a global audience. In this example, our entry has the locales en-US and de-DE, which means it's available in English (United States) and German (Germany).

Add locales to a space


First, make sure locales have been set up for your organization. Talk to your developer team if you’re not sure, and have them take a look at our guide if they need help.

Once locales have been set up, you can add them to a space.

new-locale

To add a locale to a space:

  1. Log in to the Contentful web app.

  2. Сlick Settings and select Locales from the drop-down menu. The Locales page is displayed.

    Locales open from settings
  3. In the Locales page, click Add Locale in the right-hand sidebar. The New locale page is displayed.

    Locale add locale

  4. Under the Locale section, select the required locale from the Select a locale drop-down menu. Make sure you pay attention to the language-region keys.

  5. Optional: Under the Fallback locale section, select a fallback language to be displayed if a translation in the selected locale is not available. 

  6. Optional: Under the Locale settings section, select the Enable this locale in response checkbox to include the locale in the response of both the Content Delivery API and the Content Preview API.

    Note that the checkbox is selected by default.

  7. Optional: If you have required fields in your content type, select the Allow empty fields checkbox. If the checkbox is not selected, your editors cannot publish content without adding a translation for the required field.

    Locale set up locale

  8. Once you are content with the setup, click the green Save button. Your locale is added to your space. 

    Locale save locale


For a more in-depth guide to locales and setting them up, see our locale concept documentation.

Edit a locale

To edit an existing locale:

  1. Log in to the Contentful web app.

  2. Сlick Settings and select Locales from the drop-down menu. The Locales page is displayed.

    Locales open from settings

  3. Go to the required locale and click to open it.

    Locale open specific locale

  4. Edit the fields or locale options you’d like, and click Save to apply the changes.

    Locale save locale

Delete a locale

To delete an existing locale:

NOTE: You cannot delete the default locale for a space.

  1. Log in to the Contentful web app.

  2. Сlick Settings and select Locales from the drop-down menu. The Locales page is displayed.

    Locales open from settings
  3. Go to the required locale and click to open it.

    Locale open specific locale
  4. Click Delete. The delete locale dialog is displayed. Make sure you’re deleting the correct locale.

    Locale delete a locale
  5. Enter the code for the locale to confirm, and click Delete.

    Locale confirm delete locale

    NOTE: To cancel, click the grey Don’t Delete  button.

Enable locales for fields and entries

Locale  enable field localization

Once locales are added to your space, the next step is to enable them for fields and entries. 

To enable locales for fields and entries:

  1. Log in to the Contentful web app.

  2. Go to the Content model tab.

  3. Go to the required content type and click to open it. The content type editor is displayed.

  4. Go to the required field and click Settings.

  5. Under the "Settings" tab, select the Enable localization of this field checkbox under the "Field options" area. 

  6. Click Confirm to save changes.

  7. Click Save to apply changes to the content type. All entries of your content type can be edited for the locales that are added to your space.

Add and edit translations

Once locales have been set up and enabled, adding translations is done with the entry editor. 

working-with-locales

To add translations for an entry:

  1. Log in to the Contentful web app.

  2. Go to the Content tab.

  3. Go to the required entry and click to open it. The entry editor is displayed.

  4. In the sidebar, scroll to the TRANSLATION area to view the list of all language locales for your entry. By default, the single locale option is enabled.

  5. Select your locale viewing mode according to the following options:

    • View multiple locales simultaneously — Select Multiple locales option from the drop-down menu. Add more locales for viewing by clicking Change and selecting checkboxes against your desired locales.

    • View one locale at a time — Select Single locale option from the drop-down menu. The fields for only one locale are displayed, while the fields for the other language locales are hidden. You can switch between the locales using the locales drop-down.

  6. Add content to the fields of the newly added locales as described in Add a new entry. Click Publish when you’re finished.

Localize assets

You can have multi-language versions of your media assets, just like you can for entries. Adding translations for assets is done in the media editor. 

To localize an asset:

  1. Log in to the Contentful web app.

  2. Go to the Media tab.

  3. Go to the required asset and click to open it. The asset editor is displayed.

  4. In the sidebar, scroll to the TRANSLATION area to view the list of all language locales for your asset.

  5. Select your locale viewing mode according to the following options:

    • View multiple locales simultaneously — Select Multiple locales option from the drop-down menu. Add more locales for viewing by clicking Change and selecting checkboxes against your desired locales.

    • View one locale at a time — Select Single locale option from the drop-down menu. The fields for only one locale are displayed, while the fields for the other language locales are hidden. You can switch between the locales using the locales drop-down.

  6. Add media and related content to the fields of the newly added locales as described in Add new assets. Click Publish when you’re finished uploading your files.

Additional resources

For a more in-depth explanation of working with locales, see the following video: