From 9243d9b311335e4306f9c2868a73edf588671e73 Mon Sep 17 00:00:00 2001 From: Hanne Moa <hanne.moa@uninett.no> Date: Tue, 1 Mar 2016 14:49:00 +0100 Subject: [PATCH] Support Twig extension i18n --- composer.json | 3 ++- config-templates/config.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cd57231d9..60ea76fc1 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "simplesamlphp/saml2": "dev-master#00e38f85b417be1e10a2d738dd2f5ea82edb472c as 2.2", "robrichards/xmlseclibs": "~2.0", "whitehat101/apr1-md5": "~1.0", - "twig/twig": "~1.0" + "twig/twig": "~1.0", + "twig/extensions": "^1.3" }, "require-dev": { "ext-pdo_sqlite": "*", diff --git a/config-templates/config.php b/config-templates/config.php index 43017312b..8c614f6df 100644 --- a/config-templates/config.php +++ b/config-templates/config.php @@ -649,6 +649,11 @@ $config = array( 'language.cookie.lifetime' => (60 * 60 * 24 * 900), /* + * Which i18n backend to use + */ + 'language.i18n.backend' => 'twig.i18n', + + /** * Custom getLanguage function called from SimpleSAML\Locale\Language::getLanguage(). * Function should return language code of one of the available languages or NULL. * See SimpleSAML\Locale\Language::getLanguage() source code for more info. -- GitLab