madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

External translation files #61

Open ausi opened 8 years ago

ausi commented 8 years ago

Check if there is a feasible solution to enable external translation files. See http://help.rocksolidthemes.com/discussions/contao/14224

renaudkaczmarek commented 8 years ago

Hi Ausi, have you got some news for us? We really need to choose a solution (Contao Theme) in the next days for our business, and I really really want to use Rocksolid for all our clients here. But the only condition is to be able to translate Custom Elements easily. Hope you can find a way soon and not only for us but for all non English/German people ;)!

Thank you for your time. BR. Renaud

ausi commented 8 years ago

External translation files are not integrated at the moment. But maybe this solution could work for you:

Assuming the custom element boxes, rename the original config file to _rsce_boxes_configoriginal.php and create a new one called _rsce_boxesconfig.php with the following contents:

<?php

$config = include substr(__FILE__, 0, -4) . '_original.php';

$config['fields']['headline']['label']['fr'] = array('Headline (translated)', '');
$config['fields']['boxes']['label']['fr'] = array('Boxes (translated)', '');

return $config;

This way you don’t have to modify the original config file and are able to update them.