Site Building

10.3. Translating Content for Drupal 8, 9, and 10

Goal

Translate the home page to Spanish.

Site prerequisites

Steps

Sprout Video
  1. In the Manage administrative menu, navigate to Content (admin/content).
  2. Locate the home page. You can search for it by entering "Home" in the title field.
  3. Select Translate from the dropdown button in the row of the Home content item. The page Translations of Home appears.
  4. Click Add in the row Spanish.

    Image
    Adding a content translation

  5. Note that the user interface has switched to Spanish. To switch it back to English, remove the first instance of es in the browser’s URL. For example, if your URL looks like example.com/es/node/5/translations/add/en/es, remove the es that comes immediately after example.com.
  6. Fill in the fields as shown below.

    Field name Explanation Value

    Title

    Translated title of the page

    Página principal

    Body

    Translated body of the page

    Bienvenido al mercado de la ciudad - ¡el mercado de agricultores de tu barrio! Horario: Domingos de 9:00 a 14:00. Desde Abril a Septiembre Lugar: parking del Banco Trust número 1. En el centro de la ciudad

    URL alias > URL alias

    Translated address of the webpage

    pagina-principal

  7. Click Save (this translation).
  8. Go to your site’s home page to view the newly translated page.

Expand your understanding