first commit
This commit is contained in:
18
class/smarty_plugins/modifier.translate.php
Normal file
18
class/smarty_plugins/modifier.translate.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Smarty plugin.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty {translate} function plugin.
|
||||
*/
|
||||
function smarty_modifier_translate($string, $category = null, $silent = false, $isAdministration = null)
|
||||
{
|
||||
if (is_null($category) && !empty(Smarty::$global_tpl_vars['TRANSLATIONS_DOMAIN'])) {
|
||||
$category = end(Smarty::$global_tpl_vars['TRANSLATIONS_DOMAIN']);
|
||||
}
|
||||
|
||||
// echo "Kategorie: $category -- ";
|
||||
return translate($string, $category, $silent, $isAdministration);
|
||||
}
|
||||
Reference in New Issue
Block a user