diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-11-25 09:00:49 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-11-25 09:00:49 +0100 |
commit | 75a5c3554a8a4d7f88c4abecb155566c74c30afc (patch) | |
tree | d56d28593fa56f8d0e994b62dfbf42d0215a4795 /program/lib | |
parent | f59cfe88063957a0d07a99b6893e5e2cd8598f53 (diff) |
Add possibility to overwrite a label/message in Roundcube's language package (#1489433)
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/Roundcube/rcube.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index e0fa22c3c..331b57e96 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -642,10 +642,11 @@ class rcube /** * Load a localization package * - * @param string Language ID - * @param array Additional text labels/messages + * @param string $lang Language ID + * @param array $add Additional text labels/messages + * @param array $merge Additional text labels/messages to merge */ - public function load_language($lang = null, $add = array()) + public function load_language($lang = null, $add = array(), $merge = array()) { $lang = $this->language_prop(($lang ? $lang : $_SESSION['language'])); @@ -685,6 +686,11 @@ class rcube if (is_array($add) && !empty($add)) { $this->texts += $add; } + + // merge additional texts (from plugin) + if (is_array($merge) && !empty($merge)) { + $this->texts = array_merge($this->texts, $merge); + } } |