From df92d093d9a3f6ca9da961ecfc1ad01f6d53e5f7 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 15 Jun 2011 13:40:09 +0000 Subject: Added T_defaultlang() to avoid direct access to global it_text->defaultlanguage --- auto_prepend.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'auto_prepend.php') diff --git a/auto_prepend.php b/auto_prepend.php index e9e6990..b71acb7 100644 --- a/auto_prepend.php +++ b/auto_prepend.php @@ -111,6 +111,16 @@ function T_lang() return $GLOBALS['it_text']->get_language(); } +/** + * Get active language + * @return default language of browser + */ +function T_defaultlang() +{ + it_text::init(); + return $GLOBALS['it_text']->get_defaultlanguage(); +} + /** * Get available languages * @return available languages as langcode => langname -- cgit v1.2.3