diff options
Diffstat (limited to 'app/Core/Translator.php')
-rw-r--r-- | app/Core/Translator.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/Core/Translator.php b/app/Core/Translator.php index 0f5a77cc..e3d19692 100644 --- a/app/Core/Translator.php +++ b/app/Core/Translator.php @@ -27,6 +27,31 @@ class Translator private static $locales = array(); /** + * Instance + * + * @static + * @access private + * @var Translator + */ + private static $instance = null; + + /** + * Get instance + * + * @static + * @access public + * @return Translator + */ + public static function getInstance() + { + if (self::$instance === null) { + self::$instance = new self; + } + + return self::$instance; + } + + /** * Get a translation * * $translator->translate('I have %d kids', 5); |