I'm new in php and I'd like to know if it's possible to do what I'm trying.
I'm writting a multilanguage web. I've created a global variable that contains a character indicating the language ($lang).
I've got also, an external file that I include in every web, where I've got all the captions, in array, with the values translated, I mean:
$links_array = array('c'=>'Enllaços','e'=>'Enlaces','f'=>'Links','a'=>'Links');
In every web I've got a button for every language. In the onclick event, I've got this code:
With this I want when the user clicks, reload the web with the language chosen.
The captions I've got in the web are like this
Code: Select all
<ul><li><?php echo $link_array[$lang] ?></li></ul> Thanks very much