From c66a5ba7321bf39e9fedaf48260f09a2aaa7d855 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 18 Oct 2021 21:41:08 +0200 Subject: invite: use the actual set language and check if we have a template for it --- Zotlabs/Module/Invite.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Invite.php b/Zotlabs/Module/Invite.php index 76341d789..c301aaea2 100644 --- a/Zotlabs/Module/Invite.php +++ b/Zotlabs/Module/Invite.php @@ -422,8 +422,6 @@ class Invite extends Controller { // let take one descriptive for template (as said is never used) $invite_code = 'INVITATE2020'; - // what languages we use now - $lccmy = ((isset(App::$config['system']['language'])) ? App::$config['system']['language'] : 'en'); // and all the localized templates belonging to invite $tpls = glob('view/*/invite.*.tpl'); @@ -444,6 +442,9 @@ class Invite extends Controller { $langs = array_keys($tpla); asort($langs); + // Use the current language if we have a template for it. Otherwise fall back to 'en'. + $lccmy = ((in_array(App::$language, $langs)) ? App::$language : 'en'); + $tplx = array_unique($tplx); asort($tplx); -- cgit v1.2.3