diff options
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 +}); |