Best practises to add multilanguages support in Slim 3?


Are there any best concepts /practices/ addons to add multilanguages support on my Slim 3 website?

This depends on what you mean. Do you mean ML in terms of content served from the DB or ML in terms of strings you use in your HTML?

If you’re talking MP in terms of hardcoded strings in your PHP or HTML/Twig code, I would suggest you install the gettext extension. Simply add this to your composer.json:

"gettext/gettext": "^3.6.0"

Hope this helps.

1 Like

In context of string in HTML.
From DB point of view I prefer schema-free mongoDb.

Thank you! GetText is that I was searching for!