For automatic translation of subtitles, here's how to do it manually :
1. Click on the settings icon (⚙️) in YouTube player.
2. Select “Subtitles/CC”.
3. Choose “Translate automatically” and select “French” in the list.
This should translate the subtitles automatically into French. Once this adjustment is made, YouTube should remember your preference on the same device.