Database maintained by i18n PHP site

I have a website written in PHP with 15-20 pages and they have a lot of text. I have to translate it into 3 different languages. First, I tried using strings ( $text_hello = "你好";), but this option becomes very tedious and difficult to manage with 50 strings. I also discovered the gettext option, which is good. But I was particularly interested in the database option with support for MySQL (MySQL), where all the translation was obtained from the database. Also, I could be wrong, but with gettext you should have this extra index.php ?lang=en_US(?) I want it to change the same as on Twitter or Facebook, where the url is not changing. Can you suggest me how to do this or lead me to a textbook / article / previous questions on this topic? Thank!

I have also seen people recommending Zend_Translate, but do I need to rewrite my site as part of Zend?

Before asking, I searched for it, but the results I got were not what I was looking for.

+5
source share
1 answer

Also, I might be wrong, but with gettext, should you have this extra index.php? LANG = en_US

Yes, you are mistaken, the lang parameter can be hidden if you like (for example, using a session and / or cookie). It can also be part of your SEO strategy (url like / en / mypage or / fr / mypage)

Multilang , , .
, :
?

, , Zend_Translate, Zend?

Zend_Translate ( )

+4

All Articles