Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flash message translations #1418

Open
mpiot opened this issue May 4, 2023 · 1 comment
Open

Flash message translations #1418

mpiot opened this issue May 4, 2023 · 1 comment

Comments

@mpiot
Copy link

mpiot commented May 4, 2023

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.

  1. 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.
  2. Can it be a good idea to use a cusom domain ?
  3. 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.

@javiereguiluz
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants