public function load_language($lang = null, $add = array(), $merge = array())
    {
        $lang = $this->language_prop($lang ?: $_SESSION['language']);

        // load localized texts
        if (empty($this->texts) || $lang != $_SESSION['language']) {
            $this->texts = array();

            // handle empty lines after closing PHP tag in localization files
            ob_start();

            // get english labels (these should be complete)
            @include(RCUBE_LOCALIZATION_DIR . 'en_US/labels.inc');
            @include(RCUBE_LOCALIZATION_DIR . 'en_US/messages.inc');

            if (is_array($labels))
                $this->texts = $labels;
            if (is_array($messages))
                $this->texts = array_merge($this->texts, $messages);

            // include user language files
            if ($lang != 'en' && $lang != 'en_US' && is_dir(RCUBE_LOCALIZATION_DIR . $lang)) {
                include_once(RCUBE_LOCALIZATION_DIR . $lang . '/labels.inc');
                include_once(RCUBE_LOCALIZATION_DIR . $lang . '/messages.inc');

                if (is_array($labels))
                    $this->texts = array_merge($this->texts, $labels);
                if (is_array($messages))
                    $this->texts = array_merge($this->texts, $messages);
            }

            ob_end_clean();

            $_SESSION['language'] = $lang;
        }

        // append additional texts (from plugin)
        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);
        }
    }