In my MVC view files, there exist strings I may have a translation for. In a file with access to the database (the model), I can do:
$Lang->say('Welcome');
Here is what it's doing:
public function say($string) {
if (empty(self::$vocabulary)) {
self::$vocabulary = $this->loadLanguage($this->currentLanguageID()); // Load vocabulary for current language
}
if (isset(self::$vocabulary[$string])) {
return self::$vocabulary[$string];
}
return $string;
}
I need access to this say()
function from within my view. Short of passing the entire vocabulary array to the view, how would I do this?