Bonjour-> Hello-> Hola: Translate your Site
Unleash the magic of Symfony's Translation component. Translate content, use localized routing, add a language switcher and connect to a translation provider!
- intermediate
- 140 students
- EN/ES Captions
- EN/ES Script
- Certificate of Completion
Your Guides
About this course
Take a single-language Symfony app and turn it into a multilingual experience using the Translation component. You'll take Spacebar, a space-themed blogging platform, and convert it to support multiple languages—without overcomplicating the codebase.
You’ll learn how to:
- Set up and configure Symfony’s Translation component
- Translate routes and URLs for language-friendly navigation
- Add a language switcher to your UI
- Organize messages using catalogs and domains
- Translate content in both PHP and Twig
- Connect to third-party translation providers
Whether you're preparing your app for global users or just adding support for a second language, this course will give you the tools to do it right!
Next courses in the Symfony 7: Learn More Tricks section of the Symfony 7 Track!
2 Comments
Hey @Davide-S!
We aren't covering database translations in this course.... but stay tuned... I have a followup course that will address at least some of what you discuss... in an interesting way!
--Kevin
Will you also talk about the translation of doctrine entities?
...and how to handle translations with the symfony form system?
...and how to generate translated slug for each object?
...and how to manage nested tree of translated objects with translated slug? (a super-pro problem)
I've always preferred the knplabs/doctrine-behaviors solution but sadly is now abandoned.
I know that gedmo/doctrine-extensions could be an alternative but I don't like the fact that the developer have to choose a default locale and the translations are stored in a single big table and the integration with the form system is a bit more difficult
I have no clear solution for that problem.
A tutorial on that wold help a lot.
Thanks