2 languages ​​on the website using php

前端 未结 2 767
轻奢々
轻奢々 2021-01-28 19:31

Help please organize bi-lingual website.

So first there are two files eng.php, es.php and they will be stored in translation site.

example:

$lang         


        
2条回答
  •  情书的邮戳
    2021-01-28 20:06

    You can have two files like this.

    Source of en.php:

    $lang = array(
        'hi' => 'Hi'
    );
    

    Source of es.php:

    $lang = array(
        'hi' => 'Hello'
    );
    

    And for the main content file, the source should be this way:

    
    

提交回复
热议问题