summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_shared.inc
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2005-10-31 23:41:00 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2005-10-31 23:41:00 +0000
commit4c39bff72f5e5e63a5e3157f6fdd3ce332c40eca (patch)
tree44fb0ae35b10af5a500937b91cd2c0793f68d751 /roundcubemail/program/include/rcube_shared.inc
parentb13a1d6dbdcf8a3299718bd611bccd609a83cf6d (diff)
Added Finnish, Romanian and Chinese translation
git-svn-id: https://svn.roundcube.net/trunk@67 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_shared.inc')
-rw-r--r--roundcubemail/program/include/rcube_shared.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc
index c0df2e585..edf19b66e 100644
--- a/roundcubemail/program/include/rcube_shared.inc
+++ b/roundcubemail/program/include/rcube_shared.inc
@@ -29,6 +29,7 @@ class rcube_html_page
var $scripts_path = '';
var $script_files = array();
var $scripts = array();
+ var $charset = 'ISO-8859-1';
var $script_tag_file = "<script type=\"text/javascript\" src=\"%s%s\"></script>\n";
var $script_tag = "<script type=\"text/javascript\">\n<!--\n%s\n\n//-->\n</script>\n";
@@ -82,6 +83,11 @@ class rcube_html_page
}
+ function set_charset($charset)
+ {
+ $this->charset = $charset;
+ }
+
function write($templ='', $base_path='')
{
@@ -94,6 +100,11 @@ class rcube_html_page
// replace specialchars in content
$__page_title = rep_specialchars_output($this->title, 'html', 'show', FALSE);
$__page_header = $__page_body = $__page_footer = '';
+
+
+ // include meta tag with charset
+ if (!empty($this->charset))
+ $__page_header = '<meta http-equiv="content-type" content="text/html; charset='.$this->charset.'" />'."\n";;
// definition of the code to be placed in the document header and footer
@@ -1031,7 +1042,7 @@ function rcube_browser()
// get text in the desired language from the language file
function rcube_label($attrib)
{
- global $sess_user_lang, $INSTALL_PATH;
+ global $sess_user_lang, $INSTALL_PATH, $OUTPUT;
static $sa_text_data, $s_language, $utf8_decode;
// extract attributes
@@ -1195,7 +1206,7 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
{
if (!$html_encode_arr)
{
- $html_encode_arr = get_html_translation_table(HTML_ENTITIES);
+ $html_encode_arr = get_html_translation_table(HTML_ENTITIES); // HTML_SPECIALCHARS
$html_encode_arr[chr(128)] = '&euro;';
unset($html_encode_arr['?']);
unset($html_encode_arr['&']);