10-27-2007, 06:36 PM
|
#2 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Firstly, please always put quotes around your array keys ($lang['first_page']). Secondly, when you include the language file the variable is only set within the scope of the getLanguage function and is therefore not available globally. There are various ways to solve your problem depending on precisely how you want to handle things.
One solution would be to assign a member variable to the class and then you'd have to access them rather than using a global variable. Alternatively you can just add the line $GLOBALS['lang'] = $lang directly below each of the three include lines. The latter being a hackish and very much frowned upon way of handling things but it would work for you.
|
|
|
|