diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-06-20 20:29:30 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-06-20 20:29:30 +0200 |
commit | 91c37bbb7642b996e4c386b3033cca02831371ef (patch) | |
tree | 96984269f6851e9208e26c9533c5ce4e045396c5 /core/js/js.js | |
parent | 272fc252fb71422db2101a76fc541f20924808cd (diff) | |
download | nextcloud-server-91c37bbb7642b996e4c386b3033cca02831371ef.tar.gz nextcloud-server-91c37bbb7642b996e4c386b3033cca02831371ef.zip |
moved core stuff to /core
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js new file mode 100644 index 00000000000..7e44b7ce6d5 --- /dev/null +++ b/core/js/js.js @@ -0,0 +1,23 @@ +var _l10ncache = {}; +function t(app,text){ + if( !( app in _l10ncache )){ + $.post( oc_webroot+'/l10n/javascript.php', {'app': app}, function(jsondata){ + _l10ncache[app] = jsondata.data; + }); + + // Bad answer ... + if( !( app in _l10ncache )){ + _l10ncache[app] = []; + } + } + if( typeof( _l10ncache[app][text] ) !== 'undefined' ){ + return _l10ncache[app][text]; + } + else{ + return text; + } +} + +$(document).ready(function(){ + // Put fancy stuff in here +}); |