Hygraph
Docs

#Lesson 6.2 - Localize content

In this lesson, you will add a Spanish locale to the project and write localized content for the Summer Campaign and the product entries.

While you were building the schema in lesson 1.2, certain fields were marked with the Localize field checkbox. Only those fields are available for localization in the content editor. Fields that were not marked are not localizable and display only the default English value. Adding a locale at the project level is what makes the language toggle available at the entry level. Without this step, the Spanish tab does not appear in the content editor.

#Add a locale

Add a locale
  1. Navigate to Project settings > General > Locales.
  2. Use the dropdown to select Spanish.
  3. Click Add.

The Spanish locale is now added to the project and the language toggle appears in the content editor for all localizable fields.

#Localized content

#Summer Campaign

Localize Summer Campaign entry
  1. Open the Summer Campaign landing page entry in the content editor.

  2. Under Localizations, click + next to Spanish to add fields for the Spanish locale.

  3. Fill in the following localized fields and click Save & Publish:

    FieldTranslated content
    Landing page titleCampaña de verano
    Stripes > Call to Action > HeadingPrepárate para el verano con estas increíbles ofertas
    Stripes > Call to Action > Body¡Las rebajas de verano están en pleno apogeo! Mira las increíbles ofertas de verano que tenemos a continuación!
    Stripes > Product Grid > HeadlineRopa de verano

#Products

Repeat the same process for the following product entries:

Blue running shoes

FieldTranslated content
Product nameZapatillas para correr azules
Product descriptionEstas zapatillas de running azules ofrecen tanto forma como función, brindando un apoyo excepcional y estilo para tus actividades deportivas. El material transpirable y la suela acolchada garantizan una experiencia cómoda kilómetro tras kilómetro.

Plaid shirt

FieldTranslated content
Product nameCamisa a cuadros
Product descriptionEsta camisa a cuadros emana un encanto atemporal, ideal para un día casual fuera o una reunión relajada por la tarde. El patrón clásico a cuadros y el ajuste cómodo la convierten en una prenda básica para un estilo sin esfuerzo.

Black leather shoes

FieldTranslated content
Product nameZapatos de cuero negro
Product descriptionEstos zapatos de cuero negro combinan de manera impecable la sofisticación con la durabilidad, convirtiéndolos en una elección versátil tanto para ocasiones formales como para uso diario. El diseño elegante y el cuero de alta calidad garantizan un atractivo atemporal que complementa cualquier conjunto.

Necklace

FieldTranslated content
Product nameCollar
Product descriptionEste collar blanco está elaborado con partes de caracoles de mar, evocando la esencia relajada y playera. Perfecto para quienes buscan un toque marino en su estilo diario.

Headband

FieldTranslated content
Product nameVincha
Product descriptionEsta vincha de algodón blanco brinda un toque elegante y sofisticado a tu peinado. Ideal para completar tu look con un toque de moda y comodidad.

#What's next

Lesson 6.3 - Understand content stages

Or, go to the Tutorial overview for the full lesson list.