Open
Description
Hi everyone, I post that message do discuss about the better way to translate flash messages. In my case, I use symfony/demo as the place were better practices are grouped in a project.
- I wonder if it can be interesting to call the
t()
function in the Controller to have the extractor ?
The second case allow to auto-extract the messages in XLIFF, but add complexity in the Controller. - Can it be a good idea to use a cusom domain ?
- Is it better to use reusable keyword ? or like actually localized keywords ?
These are questions I am asking myself right now to implement tramslation in a project. I know that questions are not totally related with the demo, it's more best practices.
Activity
javiereguiluz commentedon May 31, 2023
Id' say that (2) we should not use a custom domain (the complication is not worth it) and that (3) we should use keywords as recommended in Symfony best practices (see https://symfony.com/doc/current/best_practices.html#use-keys-for-translations-instead-of-content-strings).
About (1) I'm not sure what should we do. Let's read other opinions. Thanks!