DotTwigrenderer extends Twig with a filter called trans that parses translations in singular and plural forms.
The local.php.dist file in frontend provides an example for working with multiple languages.
The translator variable can be expanded to other languages using Poedit which can edit .po files like the example in data/language/da_DK/LC_MESSAGES/messages.po.
The compiled file will have the extension .mo.
To apply the translations
{% trans 'translateText' %} or {{ translateText|trans }}translateText("translateText")To have a proper behavior of language selector, you need the language pack installed at the Operating System level.
dnf install glibc-all-langpacks
Then restart PHP-FPM.