Skip to main content
The cart is empty

How to enabled front-end translation

This article will explain how to translate sp page builder module, this is tested with sp page builder version 3.6.4 pro and 3.7.1 pro

Since SP PageBuilder 3.7.11 this change are no more necessary

The translation don't work by default with module you have to modify a file in sp page builder.

The file is components/com_sppagebuilder/views/form/tmpl/edit.php 

You have to change the file like this line 5 and 30 below (line 82-110 in the original file)

$addons_list = SpAddonsConfig::$addons;
$globalDefault = SpPgaeBuilderBase::getSettingsDefaultValue($global_attributes);

//sbou
Joomla\CMS\Plugin\PluginHelper::importPlugin('system');
//fin sbou

foreach ($addons_list as &$addon) {
   $new_default_value = SpPgaeBuilderBase::getSettingsDefaultValue($addon['attr']);
   $default_value = array(
      'default' => array_merge($new_default_value['default'], $globalDefault['default'])
   );
   $addon['default'] = $default_value['default'];
   // if(isset($default_value['attr'])){
   //     $addon['attr'] = $default_value['attr'];
   // }
   $addon['visibility'] = true;

   if(!isset($addon['category']) || empty($addon['category'])){
      $addon['category'] = 'General';
   }

   $addon_name = preg_replace('/^sp_/i', '', $addon['addon_name']);
   $class_name = 'SppagebuilderAddon' . ucfirst($addon_name);
   if(method_exists($class_name, 'getTemplate')){
      $addon['js_template'] = true;
   }

   //sbou
   Joomla\CMS\Factory::getApplication()->triggerEvent('onBeforeAddonConfigure', array($addon_name, &$addon));
   //fin sbou
}