
Description
Description
Symfony allows you to do a lot of things, but I'm having a hard time managing languages. We do not exploit the potential of language files.
The Xliff, for example, you cannot put comments in the code, it is ignored, and if you put the comments in an xlif file, during the next update run, they are all deleted. Identical for po files. I read your files and watch to keep it simple, because there is no point in making gas plants either. I therefore took over the basis of the management of po files to directly manufacture templates, .pot.
We make the best use of the generated files and the use of PoEdit or others to translate the files with the keys and the source text. Then we take the translation program we open the .pot file, we translate, we save it in .po, the little tinkering I change the extension to .to so as not to modify the existing po system. Which gives as in the examples.
Example
By default
msgid "validator.empty.value"
msgstr "__validator.empty.value"
With feature
#. S "validator.selection.choice"
msgctxt "Conseille"
msgid "Cette valeur doit être l'un des choix proposés."
msgstr "Cette valeur doit être l'un des choix proposés."
#. S "validator.select.choice"
#. P "validator.select.choices"
msgctxt "Conseille 2"
msgid "You must select at least {{ limit }} choice."
msgid_plural "You must select at least {{ limit }} choices."
msgstr[0] "Vous devez sélectionner au moins {{ limit }} choix."
msgstr[1] "Vous devez sélectionner au moins {{ limit }} choix."
#. S or P using comment developper for key
msgctxt for context eg : Rage, Important, Happy etc..
and msgid they are really used for text
I will not hide from you that this is the first time that I use a framework and I chose Symfony to create a project (self-taught) and to do well this project is a game that integrates forum, blog, chat, discord link etc. If I cut it represents 47 bundles. Given its size and complexity, I find myself faced with things that are missing. May I also suggest, would it be possible to add a setDefaultdomain to TranslatorInterface to avoid putting each time the domain for which the translation is intended in the controllers?
Here are the files necessarily you have to do the service in the configurations.
Translator.tar.gz
Thank you :)
Regards,