<![CDATA[ Easy2Gallery multilingual - My Forums]]> https://forums.modx.com/thread/?thread=98047 <![CDATA[Re: Easy2Gallery multilingual]]> https://forums.modx.com/thread/98047/easy2gallery-multilingual#dis-post-530224 http://altipoint.ch/modx_development/easy2g/

- populate_easy2_multilingual.sql.txt contains the requests to populate the two tables

- fonds.zip contains the pictures sorted in 3 galleries

The pictures come from the Swiss National Library.
http://www.nb.admin.ch/sammlungen/graphische_sammlung/00649/index.html?lang=en
They are available under Creative Common licence on Wikimedia.]]>
Jul Aug 19, 2015, 08:43 AM https://forums.modx.com/thread/98047/easy2gallery-multilingual#dis-post-530224
<![CDATA[Easy2Gallery multilingual]]> https://forums.modx.com/thread/98047/easy2gallery-multilingual#dis-post-530218
I slightly adapted the code of Easy2Gallery's module to make it multilingual.
Added new table easy2_translations storing the multilingual fields.

The 'summary' field was renamed to 'title' to store the multilingual titles of the picture.
Added fields 'author' and 'source'. The maximum length some fields was shortened.

A multiligual version of the module class can be downloaded here:
http://altipoint.ch/modx_development/easy2g/includes/classes/
More details in the comments at the beginning of the file.

Please note that this is work under progress and the templates must still be adapted.
I'll try to post soon some SQL requests and pictures so that you can easily populate demonstation tables.

The new table structure
CREATE TABLE `modx_easy2_files` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `dir_id` int(10) unsigned NOT NULL default '0',
  `filename` varchar(128) NOT NULL default '',
  `size` varchar(32) NOT NULL default '',
  `name` varchar(128) NOT NULL default '',
  `author` varchar(32) default '',
  `tag` varchar(255) default '',
  `date_added` datetime NOT NULL default '0000-00-00 00:00:00',
  `last_modified` datetime default NULL,
  `comments` int(10) unsigned NOT NULL default '0',
  `status` tinyint(3) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

CREATE TABLE `modx_easy2_translations` (
  `id` int(10) unsigned NOT NULL,
  `file_id` int(10) unsigned NOT NULL,
  `lang` char(2) NOT NULL default '',
  `title` varchar(255) NOT NULL default '',
  `source` varchar(32) default '',
  `description` text,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
]]>
Jul Aug 19, 2015, 07:58 AM https://forums.modx.com/thread/98047/easy2gallery-multilingual#dis-post-530218