mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-09 00:14:57 +02:00
fixed et2_dialog static methods like confirm did not show translations: injecting an egw object with loaded translations for current app
This commit is contained in:
@ -88,6 +88,28 @@ egw.extend('lang', egw.MODULE_GLOBAL, function() {
|
||||
return translation;
|
||||
},
|
||||
|
||||
/**
|
||||
* Load default langfiles for an application: common, _appname, custom
|
||||
*
|
||||
* @param _window
|
||||
* @param {string} _appname name of application to load translations for
|
||||
* @param {function} _callback
|
||||
* @param _context
|
||||
*/
|
||||
langRequireApp: function(_window, _appname, _callback, _context)
|
||||
{
|
||||
var lang = egw.preference('lang');
|
||||
var langs = [{app: 'common', lang: lang}];
|
||||
|
||||
if (_appname && _appname != 'eGroupWare')
|
||||
{
|
||||
langs.push({app: _appname, lang: lang});
|
||||
}
|
||||
langs.push({app: 'custom', lang: 'en'});
|
||||
|
||||
egw.langRequire(_window, langs, _callback, _context);
|
||||
},
|
||||
|
||||
/**
|
||||
* Includes the language files for the given applications -- if those
|
||||
* do not already exist, include them.
|
||||
|
Reference in New Issue
Block a user