diff options
Diffstat (limited to 'lib/private/template')
-rw-r--r-- | lib/private/template/functions.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index cbe751e59b5..8c94b7cf345 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -56,6 +56,22 @@ function style($app, $file) { } /** + * Shortcut for adding translations to a page + * @param string $app the appname + * @param string|string[] $file the filename, + * if an array is given it will add all styles + */ +function translation($app, $file) { + if(is_array($file)) { + foreach($file as $f) { + OC_Util::addStyle($app, $f); + } + } else { + OC_Util::addStyle($app, $file); + } +} + +/** * Shortcut for HTML imports * @param string $app the appname * @param string|string[] $file the path relative to the app's component folder, |