Using PHP Gettext Extension vs PHP Arrays in Multilingual Websites?

后端 未结 5 804
礼貌的吻别
礼貌的吻别 2021-01-02 07:39

So far the only 2 good things that I\'ve seen about using gettext instead of arrays is that I don\'t have to create the \"greeting\" \"sub-array\" (or whatever its called).

5条回答
  •  孤城傲影
    2021-01-02 08:06

    When user selects any language from dropdown or any area then save selected language id in session like,

    $_SESSION['language']=1;

    Now fetch data from database table ‘content’ based on language id stored in session.

    More detail here

    http://skillrow.com/multilingual-website-in-php-2/

提交回复
热议问题