msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

03 Oct 2008 Installing a new language in Zimbra 5.x

This is a short post describing how I’ve installed a new language pack to a Zimbra (ZCS) 5.0.10 installation to enable norsk/norwegian language.

  1. Download your desired language pack, in my case it was a Norwegian translation from the I18N/L10N – Translations Zimbra forum.
  2. Unpack the translation files
  3. Copy the translated files to your Zimbra server installation
    # cp *Msg_no.properties /opt/zimbra/jetty/webapps/zimbra/WEB-INF/classes/messages/ 
    # cp *Msg_no.properties /opt/zimbra/jetty/webapps/zimbraAdmin/WEB-INF/classes/messages/ 
    # cp *Keys_no.properties /opt/zimbra/jetty/webapps/zimbra/WEB-INF/classes/keys/ 
    # cp *Keys_no.properties /opt/zimbra/jetty/webapps/zimbraAdmin/WEB-INF/classes/keys/ 
    # cp ZsMsg_no.properties /opt/zimbra/conf/msgs/ 
  4. Restart Zimbra
    # su - zimbra 
    # zmcontrol stop 
    # zmcontrol start 
  5. Set the language preference in your browser and reload

Please note that since this operation will most like have to be repeated the next time you upgrade Zimbra. Mainly because Jetty changes version and the file location changes making the translated files unavailable.

Source: http://wiki.zimbra.com/index.php?title=Translations#Installing_Translations_in_ZCS_Server

Tags: , ,

Posted by

01 Oct 2008 Create a mysql trigger

This is a short description on how you can create an easy Trigger in mysql. My trigger will insert todays date when I insert a new database record.

A trigger is a named database object that is associated with a table, and that activates when a particular event occurs for the table. Some uses for triggers are to perform checks of values to be inserted into a table or to perform calculations on values involved in an update.

First you have to create a table to work with

CREATE TABLE IF NOT EXISTS `Links` (
  `Id` int(11) NOT NULL auto_increment, 
  `DateInserted` date NOT NULL,
  PRIMARY KEY  (`Id`)
)

Then we create the trigger that will insert todays date, curdate(), when you insert a new row

CREATE TRIGGER Links_TriggerDate BEFORE INSERT ON Links
FOR EACH
ROW
SET NEW.DateInserted = curdate( ) 

Triggers is a functionality that was introduced in mysql version 5.0.2
To view all your triggers i mysql

mysql> show triggers;
+--------------------+--------+--------+----------------------------------+--------+---------+----------+----------------+
| Trigger            | Event  | Table  | Statement                        | Timing | Created | sql_mode | Definer        |
+--------------------+--------+--------+----------------------------------+--------+---------+----------+----------------+
| Links_TriggerDate | INSERT | Links | SET NEW.DateInserted = curdate( ) | BEFORE | NULL    |          | root@localhost |
+--------------------+--------+--------+----------------------------------+--------+---------+----------+----------------+
1 row in set (0.00 sec)

Tags: , ,

Posted by