Internationalization in Symfony
Learn how to create a basic implementation of field-level translation in an Astro project.
Alternatively, go to Settings > Internationalization > Languages and add es (Spanish).
- In the article content type block schema, set the
titleandcontentfields as translatable. - Go to each article, select the Spanish language, and provide translated content. You can also use AI Translations.
Use the language prefix
Section titled “Use the language prefix”Update the route configuration to support language paths.
resource: '@StoryblokBundle/config/routes/webhook.php'storyblok_content_type:resource: '@StoryblokBundle/config/routes/content_type.php'+ prefix:+ es: '/es'+ en: ''The Storyblok Symfony bundle will automatically handle the multilingual routing and will fetch the content based on the locale prefix.
Use the language in your controller logic or in your templates, by accessing the current locale using the request object.
Related resources
Section titled “Related resources”Get in touch with the Storyblok community