What is the best way for i18n in PHP?

I am developing a website that is multilingual. There are many solutions, for example with databases, .mo files, static php files, etc. But what is the best way? Please can you give some advice? Thanks..

+4
source share
2 answers

I would go for gettext . Since it is a de facto standard and is used in many applications in different languages. Many people use it, which means more community and good support.

If you are looking for gettext in stackoverflow, you will get good resources and examples.

Getting started with PHP: http://www.onlamp.com/pub/a/php/2002/06/13/php.html

+4
source

As Ardi said, Gettext is a good solution and built-in integration with php , you can combine with intl for internationalization.

Another alternative is the Zend Framework 2 I18n module, but has dependencies on other ZF2 modules.

0
source

Source: https://habr.com/ru/post/1483407/


All Articles