diff --git a/examples/i18n/I18n.php b/examples/i18n/I18n.php index 980e649..7e0fcce 100644 --- a/examples/i18n/I18n.php +++ b/examples/i18n/I18n.php @@ -9,12 +9,12 @@ class I18n extends Mustache { public $__ = array(__CLASS__, '__trans'); // A *very* small i18n dictionary :) - private $dictionary = array( + private static $dictionary = array( 'Hello.' => 'Hola.', 'My name is {{ name }}.' => 'Me llamo {{ name }}.', ); - public function __trans($text) { - return isset($this->dictionary[$text]) ? $this->dictionary[$text] : $text; + public static function __trans($text) { + return isset(self::$dictionary[$text]) ? self::$dictionary[$text] : $text; } -} \ No newline at end of file +}