Import | Edit - Import formula's for multilingual fields

Import | Edit - Import formula's for multilingual fields

In order to select a specific language from an multi-language element you need to specify the name of the parent of the element and the name of the element itself separated with a slash followed by the ed sign and the language.
<PARENT_NAME> / <ELEMENT_NAME> @lang=' <LANGUAGE> '

BmeCat

Consider the following BmeCat4.0 file:

<BMECAT version="2005" xmlns="https://www.etim-international.com/bmecat/40%22 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22 xsi:schemaLocation="https://www.etim-international.com/bmecat/40 https://www.etim-international.com/bmecat_etim_40.xsd%22>
  <HEADER>
    <GENERATOR_INFO>DataProcessor, ProPlanet B.V., 's-Hertogenbosch, the Netherlands, email: info@proplanet.nl</GENERATOR_INFO>
    <CATALOG>
      <LANGUAGE default="true">dut</LANGUAGE>
      <LANGUAGE>eng</LANGUAGE>
...
  <T_NEW_CATALOG>
    <PRODUCT mode="new">
      <SUPPLIER_PID>AR1SC02</SUPPLIER_PID>
      <PRODUCT_DETAILS>
        <DESCRIPTION_SHORT>Schakelaar, 1-1,5mm2, 100 stuks</DESCRIPTION_SHORT>
        <DESCRIPTION_SHORT lang="eng">Switch, 1-1,5mm2, 100 stuks</DESCRIPTION_SHORT>
...

This file contains 2 languages dut (Dutch, which is the default language) and eng.

In order to be able to select the exact language with a formula you should be aware of what languages exist in the document. In the formula you must specify the exact same value for the @lang attribute.

For example when you want to select the DESCRIPTION_SHORT in the Dutch (dut) language you should use the following formula:

PRODUCT_DETAILS/DESCRIPTION_SHORT@lang='dut'

Because dut is specified as the default language of the document this formula will result in the text that is in the DESCRIPTION_SHORT without a lang attribute: Schakelaar, 1-1,5mm2, 100 stuks

When you want to select the DESCRIPTION_SHORT in the English (eng) language you should use the following formula:

PRODUCT_DETAILS/DESCRIPTION_SHORT@lang='eng'

You can also combine multiple elements in one formula. The following example will select the Dutch language with a fallback to the English language when Dutch does not exists (for one of the products in the file).

ISNULL(PRODUCT_DETAILS/DESCRIPTION_LONG@lang='dut', PRODUCT_DETAILS/DESCRIPTION_LONG@lang='eng')

Insbou004

For Insbou, we don't need to follow the entire xml structure to get the correct formula part for an element.
Instead, we only use the 'main' parent and skip the tags in between. The main parents which are being used are:

PARENT_NAME
ProductLine
TradeItemLine
PriceInformation

Furthermore, you don't need to add the 'Description' tag to your formula.

So, if you consider the following Insbou004 file:

<?xml version="1.0" encoding="utf-8"?>
<ProductData xmlns:xs="http://www.w3.org/2001/XMLSchema%22 xmlns="http://www.gs1.nl/productgegevens/insbou/004%22 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22 xsi:schemaLocation="http://www.gs1.nl/productgegevens/insbou/004 Productgegevens_insbou004.xsd">
	...
	<ProductLine>
		...
		<MultiLanguageProductDescriptions>
			<Brand>
				<Description>Draka</Description>
			</Brand>
			<ProductModel>
				<Description>VDS kabelserie serie</Description>
				<LanguageCode>nld</LanguageCode>
			</ProductModel>
			<ProductModel>
				<Description>VDS cable series</Description>
				<LanguageCode>eng</LanguageCode>
			</ProductModel>
			<ProductModel>
				<Description>câble séries</Description>
				<LanguageCode>fra</LanguageCode>
			</ProductModel>
...

This file contains translations for dutch, english and french. Like for the BMECat, when you want to select the specific language, you need to specify the language in the formula. If, for example you would like the dutch ProductModel, you can use this formula:

ProductLine/ProductModel@lang='nld'

In the table below you can find a list of often used fields and their corresponding formula, for both BMECat and Insbou.

Element examples

BmeCat 3.1 & 4.0

FieldDefaultMapping DataProcessorFormula
DESCRIPTION_SHORTTechnical DescriptionPRODUCT_DETAILS/DESCRIPTION_SHORT@lang='dut'
DESCRIPTION_LONGOriginal (long) textPRODUCT_DETAILS/DESCRIPTION_LONG@lang='dut'
MANUFACTURER_TYPE_DESCRPRODUCT_DETAILS/MANUFACTURER_TYPE_DESCR@lang='dut'
KEYWORDPRODUCT_DETAILS/KEYWORD@lang='dut'
REMARKSPRODUCT_DETAILS/REMARKS@lang='dut'
PRODUCT_STATUSPRODUCT_DETAILS/PRODUCT_STATUS@lang='dut'
UDX.EDXF.PRODUCT_SERIESFamily (Series)USER_DEFINED_EXTENSIONS/UDX.EDXF.PRODUCT_SERIES@lang='dut'
UDX.EDXF.PRODUCT_VARIATIONRange (Type)USER_DEFINED_EXTENSIONS/UDX.EDXF.PRODUCT_VARIATION@lang='dut'

Insbou004

FieldDefaultMapping DataProcessorFormula
ProductDescriptionTechnical DescriptionProductLine/ProductDescription@lang='dut'
LongProductDescriptionOriginal (long) textProductLine/LongProductDescription@lang='dut'
ProductModelDescriptionFamily (Series)ProductLine/ProductModel@lang='dut'
ProductVariationDescriptionRange (Type)ProductLine/ProductVariation@lang='dut'
TradeItemDescriptionOriginal text supplierTradeItemLine/TradeItemDescription@lang='dut'


    • Related Articles

    • Compressing large files

      It can be necessary to compress import files for certain formats. Appearantly Windows uses a different compression method for larger sets. DataProcessor does not support this compression method at the moment. If DataProcessor fails to import the zip, ...
    • Media import format (custom)

      Import with specific custom format Format Create new (Excel format) Important --> Formats: Choose Type code format (according to provided data) File structure Mapping
    • datavelden per ongeluk overschreven door foute data op clipboard

      27/05/2020 TFS 8602 data fields accidentally overwritten Bij gebruik van de zoekfunctie in het data processor TJ data grid,  kan dit gebeuren als je  per ongeluk een tekst op je Windows-klembord die je in de zoekcel hebt geplakt. De eerste regel ...
    • Publish to 2BA datapool - BMEcat4 (The Netherlands)

      File/data delivery DataProcessor can be used to provide data to datapool 2BA.nl (The Netherlands) with the new format BMEcat 4  Export BMEcat 4 is only available in online application my.dataprocessor.nl Step by step description of process of file ...