forked from Wavyzz/dolibarr
NEW Add a profile to import product translations
This commit is contained in:
@@ -133,8 +133,8 @@ class modService extends DolibarrModules
|
||||
// Menus
|
||||
//-------
|
||||
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||
|
||||
|
||||
|
||||
|
||||
// Exports
|
||||
//--------
|
||||
$r=0;
|
||||
@@ -315,6 +315,24 @@ class modService extends DolibarrModules
|
||||
'pr.tva_tx'=>'19.6',
|
||||
'pr.date_price'=>'2013-04-10');
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MULTILANGS))
|
||||
{
|
||||
$r++;
|
||||
$this->import_code[$r]=$this->rights_class.'_languages';
|
||||
$this->import_label[$r]="ProductsOrServicesTranslations";
|
||||
$this->import_icon[$r]=$this->picto;
|
||||
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||
$this->import_tables_array[$r]=array('l'=>MAIN_DB_PREFIX.'product_lang');
|
||||
// multiline translation, one line per translation
|
||||
$this->import_fields_array[$r]=array('l.fk_product'=>'Ref', 'l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription');
|
||||
//$this->import_fields_array[$r]['l.note']='TranslatedNote';
|
||||
$this->import_convertvalue_array[$r]=array(
|
||||
'l.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'Product')
|
||||
);
|
||||
$this->import_examplevalues_array[$r]=array('l.fk_product'=>'MyProductRef','l.lang'=>'en_US','l.label'=>'Label in en_US','l.description'=>'Desc in en_US');
|
||||
$this->import_updatekeys_array[$r]=array('l.fk_product'=>'Ref','l.lang'=>'Language');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user