I have a website that's currently in English; I want to be able to switch to a different language when a user clicks on a different language (there are little country flag icons on the site). The way I'm currently trying is with arrays, e.g.:
$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, it would be an insane amount of code. What other method can I try?