diff options
author | friendica <info@friendica.com> | 2012-08-13 22:12:16 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-08-13 22:12:16 -0700 |
commit | 2a49460c7766d5868115689155e3b9595e5f36a2 (patch) | |
tree | 90572db5ee307c915ef99baf2624eb450fdfba9b /include/plugin.php | |
parent | 6fcb3b44156a89feda9293c289175d0dec79cd80 (diff) | |
download | volse-hubzilla-2a49460c7766d5868115689155e3b9595e5f36a2.tar.gz volse-hubzilla-2a49460c7766d5868115689155e3b9595e5f36a2.tar.bz2 volse-hubzilla-2a49460c7766d5868115689155e3b9595e5f36a2.zip |
improvements in js localisation/translation
Diffstat (limited to 'include/plugin.php')
-rw-r--r-- | include/plugin.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/plugin.php b/include/plugin.php index 2460e8ad6..9555268f7 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -485,3 +485,29 @@ function theme_include($file) { } return ''; } + + + +if(! function_exists('get_intltext_template')) { +function get_intltext_template($s) { + global $a; + + if(! isset($a->language)) + $a->language = 'en'; + + if(file_exists("view/{$a->language}/$s")) + return file_get_contents("view/{$a->language}/$s"); + elseif(file_exists("view/en/$s")) + return file_get_contents("view/en/$s"); + else + return file_get_contents("view/$s"); +}} + +if(! function_exists('get_markup_template')) { +function get_markup_template($s) { + + $x = theme_include($s); + if($x) + return file_get_contents($x); +}} + |