From 53737666c64a5670d661ece071f5b913e45f195a Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Sun, 12 Jul 2015 13:45:47 +0200 Subject: add bootstrap datepicker --- includes/helper/internationalization_helper.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'includes/helper') diff --git a/includes/helper/internationalization_helper.php b/includes/helper/internationalization_helper.php index 836bbc6a..a8fdd0f0 100644 --- a/includes/helper/internationalization_helper.php +++ b/includes/helper/internationalization_helper.php @@ -6,6 +6,20 @@ $locales = array( $default_locale = 'en_US.UTF-8'; +/** + * Return currently active locale + */ +function locale() { + return $_SESSION['locale']; +} + +/** + * Returns two letter language code from currently active locale + */ +function locale_short() { + return substr(locale(), 0, 2); +} + /** * Initializes gettext for internationalization and updates the sessions locale to use for translation. */ -- cgit v1.2.3-54-g00ecf