I have a PHP site. Now I need to "convert" it into a multilingual site by adding an option where the users will be able to select the language of their preference. Let's say I want 2 languages for the beggining and then a smart way to add new languages when it needed.
Database VS Language files...
As I know there is two options.
1) I can use MySQL database tables with languages, translations, etc and every time based on user's preferred language to retrieve data from the db which means lots of database requests.
2) I can use external language PHP files using define
command (like some e-commerce frameworks who have different languages files into a language folder such as fr.php eng.php etc)
What is better? The answers must based on the following arguments with their pros and cons.
1) Best performance
2) Flexibility
3) More efficient
4) Intelligent way
5) Resources usage (CPU, Memory etc)
P.S. The Google translation tool for websites isn't a proper solution in my case.