I have to develop a pretty simple php website so I don't need framework. But it's must support multi language (EN/FR/CHINESE). I have looked for php built in system and I found two ways :
- intl module from php5.3 (http://php.net/manual/fr/book.intl.php)
- gettext (http://php.net/manual/fr/book.gettext.php)
I have no experience in i18n without framework, so any advices about what's the simplest way to support multi language ?
At end I just need a function that search translation into file (one file by language).
EQ :
trans('hello');
=> en.yaml (yaml or not, it's an example)
hello: "Hello world!"
=> fr.yaml
hello: "Bonjour tout le monde !"
And if possible I prefer Pure PHP implementations