summaryrefslogtreecommitdiff
path: root/includes/helper
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2015-07-12 13:45:47 +0200
committerPhilip Häusler <msquare@notrademark.de>2015-07-12 13:45:47 +0200
commit53737666c64a5670d661ece071f5b913e45f195a (patch)
tree0895fa57e17a80830827037ef51d636c98dab498 /includes/helper
parent993d6a4f591607e998a65b105c964c546a04e285 (diff)
add bootstrap datepicker
Diffstat (limited to 'includes/helper')
-rw-r--r--includes/helper/internationalization_helper.php14
1 files changed, 14 insertions, 0 deletions
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
@@ -7,6 +7,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.
*/
function gettext_init() {