I'm using a lookup table to define a few things for the qTranslate plugin
$trans_home = array('en' => 'Home','it' => 'Home','de' => 'Home','zh' => '首页','es' => 'Página de inicio','fr' => 'Page d\'accueil'); $trans_company = array('en' => 'Company','it' => 'L\'azienda','de' => 'Firma','zh' => '公司','es' => 'Empresa','fr' => 'Société');
Code calling up lookup table
echo $trans_home[qtrans_getLanguage()]; echo $trans_company[qtrans_getLanguage()];
I thought that if I put the lookup table in the header file I would be able to call on the table throughout the template, but it seems I need to define the lookup table in each part of the template I need it in, so for example I would have to define the table in both in the header and footer for it to work.
So the question is how do I define a lookup table that will work across all PHP elements of the template?