I faced this problem several times while building websites. I will explain the using PHP and Laravel as an example but this problem is a common amoung multiple platforms. This w
I would go with option #4, so you'd have something like this:
/lang/
/en
messages.php
words.php
/fr
message.php
words.php
/de
messages.php
words.php
This does a few things:
One thing to note, is that if your app gets REALLY big and REALLY international, you may want to use ISO language codes instead. For example, european Portugese (pt_PT) and Brazilian Portugese are different and with a global audience you'd probably want to cover both.