/**
 * basic table for all messages to be translated
 *
 * This table contains translation culumns for "de"
 */

CREATE TABLE `wbnlsmsg` (
  `mid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `singular` int(11) unsigned DEFAULT NULL,
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `domain` char(32) NOT NULL,
  `md5` char(32) NOT NULL,
  `msg` text NOT NULL,
  `msg_org` text NOT NULL,
  `trans_de_DE` text,
  `changed_de_DE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `min_de_DE` int(11) DEFAULT '0',
  PRIMARY KEY (`mid`),
  KEY `md5` (`md5`),
  KEY `domain` (`domain`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='i18n messages';

/**
 * To add another language, simply add three columns:
 * language "fr_FR"
 */
ALTER TABLE wbnlsmsg ADD COLUMN (
    `trans_fr_FR` text,
    `changed_fr_FR` datetime NOT NULL default '0000-00-00 00:00:00',
    `min_fr_FR` int(11) default 0
);

ALTER TABLE wbnlsmsg ADD COLUMN (
    `trans_en_US` text,
    `changed_en_US` datetime NOT NULL default '0000-00-00 00:00:00',
    `min_en_US` int(11) default 0
);

/**
 * Some users may translate only defined languages
 *
 * List languages that a use may translate
 */
CREATE TABLE `wbnlslangtranslator` (
  `uid` int(11) unsigned NOT NULL,
  `lang` char(5) NOT NULL,
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='i18n translators';

