added [lang] ezc function for returning a localized string

master
Tomasz Sowa 1 year ago
parent 1741597d52
commit c3122fb82f

@ -644,6 +644,7 @@ void Templates::CreateFunctions()
ezc_functions.Insert("winix_locale_tab_name", winix_locale_tab_name);
ezc_functions.Insert("winix_is_htmx_request", winix_is_htmx_request);
ezc_functions.Insert("lang", lang);
/*
who

@ -365,6 +365,7 @@ namespace TemplatesFunctions
void ls_ckeditor_funnum_browse(Info & i);
/*
privileges
*/
@ -536,6 +537,8 @@ namespace TemplatesFunctions
void winix_locale_tab_name(Info & i);
void winix_is_htmx_request(Info & i);
void lang(Info & i); // defined in winix.cpp - MOVE ME to a better place
/*
who
*/

@ -381,6 +381,15 @@ void winix_is_htmx_request(Info & i)
}
void lang(Info & i)
{
i.res = !i.par.empty();
if( i.res )
i.out << locale.Get(i.par);
}
} // namespace

Loading…
Cancel
Save