I have a website that is currently in English; I want to be able to switch to another language when the user clicks on another language (there are small country flag icons on the site). The way I'm currently trying to work with arrays, for example:
$english = array('index', array('h1' => 'this is some h1 text', 'h2' => 'this is some h2 text')); $japanese = array('index', array('h1' => 'ไธ็ไบคๆใธใฎๆญ่ฟ', 'h2' => ไธ็ไบคๆใธใฎ')); print $english[index][h1]; print $japanese[index][h2];
As you can see, if I did this for every single page in a separate language, that would be an insane amount of code. What other method can I try?
php internationalization translation
Sarmenhb
source share