-- -- General section. -- SET @sName = 'bx_en'; INSERT INTO `sys_localization_languages`(`Name`, `Flag`, `Title`, `Enabled`) VALUES('en', 'gb', 'English', '0'); -- -- Studio page and widget. -- INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES (3, @sName, '_bx_en', '_bx_en', 'bx_en@modules/boonex/english/|std-icon.svg'); SET @iPageId = LAST_INSERT_ID(); SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`='home'); SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id`=@iParentPageId); INSERT INTO `sys_std_widgets`(`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES (@iPageId, @sName, 'appearance', CONCAT('{url_studio}language.php?name=', @sName), '', 'bx_en@modules/boonex/english/|std-icon.svg', '_bx_eng_wgt_cpt', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioLanguages";}'); INSERT INTO `sys_std_pages_widgets`(`page_id`, `widget_id`, `order`) VALUES (@iParentPageId, LAST_INSERT_ID(), @iParentPageOrder + 1); -- -- Settings. -- INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES ('languages', @sName, '_bx_eng_stg_cpt_type', 'bx_en@modules/boonex/english/|std-icon.svg', 2); SET @iTypeId = LAST_INSERT_ID(); INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES (@iTypeId, CONCAT(@sName, '_system'), '_bx_eng_stg_cpt_category_system', 1); SET @iCategoryId = LAST_INSERT_ID(); INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES (@iCategoryId, CONCAT(@sName, '_switcher_title'), 'Name In Language Switcher', 'English', 'digit', '', '', '', 1);