How to make a translated version of my game

for context, i want to make a french version of my game and it will sense if your language is set to english or french

You actually can do this!
idelang
The language code for English is en and fr for French.

Did you look for something like this ?