Menu
I am trying to create a basic language file for my website.
I have included all words in a language file and they are all in a $lang[] array:
[code]
$lang[‘about’] = ‘About us’;
$lang[‘privacy’] = ‘Privacy’;
$lang[‘sitemap’] = ‘Sitemap’;
Instead of using echo all the time, I wanted a function I could use to point to the language file and print the required line by using something like: myText(‘about’); which would print: About us.
Something like:
[code]
function myText($line){
$lang[0] = $line;
echo $lang[0];
}
// At the moment a call with myText(‘about’) will return about, NOT About us.
Any ideas?