Craft CMS 3 - Always load "en" translation file I have 2 sites (fr and en), fr is default.

In index.php, I have define('CRAFT_SITE', 'fr') and define('CRAFT_SITE', 'en')

In templates, I'm using {{ 'Texte FR'|t }} tag.

In /craft/translations/en/site.php, I have my translation : 'Texte FR' =&gt; 'Text EN'

When I test the English version, it's OK.

When I test the French version, English translations are displayed.

If I remove translations folder, of course, it's OK.

If I add 'fr' folder in translations, Englishis  still displayed.

Is there a way to trace the choice of the translation file by Craft?

I can't find why ...

Thank for help. :)
In Craft 3 the setup works a little bit different from the Craft 2 setup. You don't actually have to make changes to your index.php to switch the languages. 

The languages are defined on a Site base. The translation folder now lives in the root of your projects: projectFolder/translations/fr/site.php. 

As of Craft 3.1, you can set the Base Url of each site to a variable in your .env file and use that variable in the admin panel with the site setup. @web as your Base URL doesn't work to properly detect what site you are on.

So in your case, make two sites in the admin panel. Make two variables in your .env file:

SITE_URL_FR = '...'fr/'
SITE_URL_EN = '.../en/'


Use those variables to set your Base Url in the sites config. You can target them with $SITE_URL_FR. That should do the trick.