Use NLS::setLanguageEnvironment().
authorJan Schneider <jan@horde.org>
Mon, 26 Jan 2009 15:44:59 +0000 (16:44 +0100)
committerJan Schneider <jan@horde.org>
Mon, 26 Jan 2009 15:48:32 +0000 (16:48 +0100)
imp/attachment.php
kronolith/lib/api.php

index 4b3846c..aae08c6 100644 (file)
@@ -86,8 +86,6 @@ if ($conf['compose']['link_attachments_notify']) {
                 $mail_address_full = $mail_identity->getDefaultFromAddress(true);
                 NLS::setTimeZone();
                 NLS::setLanguageEnvironment();
-                NLS::setTextdomain('imp', dirname(__FILE__) . '/locale', NLS::getCharset());
-                String::setDefaultCharset(NLS::getCharset());
 
                 /* Set up the mail headers and read the log file. */
                 $msg_headers = new Horde_Mime_Headers();
index fd5dc7d..aa34b3c 100644 (file)
@@ -1340,10 +1340,7 @@ function _kronolith_listAlarms($time, $user = null)
                 if (($reminder == 'owner' && $alarm_user == $owner) ||
                     ($reminder == 'show' && in_array($calendar, $shown_calendars)) ||
                     $reminder == 'read') {
-                    /* @todo: replace with NLS::setLanguageEnvironement(). */
-                    NLS::setLang($prefs->getValue('language'));
-                    NLS::setTextdomain('kronolith', KRONOLITH_BASE . '/locale', NLS::getCharset());
-                    String::setDefaultCharset(NLS::getCharset());
+                    NLS::setLanguageEnvironment($prefs->getValue('language'));
                     $alarm = $event->toAlarm($time, $alarm_user, $prefs);
                     if ($alarm) {
                         $alarm_list[] = $alarm;