on ‎2019 Feb 01 2:17 PM
I want to load multiple language data into Hybris using Hot folder.
Attached the configurations which i have used by using it i am able to load only English data.
I want to load Denmark, France, Japan data too. In order to achieve this what other changes i need to do.
Can any one please help me here. Thanks.
Request clarification before answering.
Assuming, you want to provide all the localized names in a single file, the header should be like:
INSERT_UPDATE Category;code[unique=true];name[lang=en];name[lang=dk];name[lang=fr];name[lang=jp];categoryFlag(code);$catalogVersion[unique=true];allowedPrincipals(uid)[default='customergroup']
and the impexRow should be like
<property name="impexRow">
<value>;{+0};{+1};{2};{3};{4};{5};{6};{7}</value>
</property>
If you have separate CSV files for each language e.g. category-en-0001.csv, category-fr-0001.csv etc., the language ISO code will be identified by batchLanguageParser based on the filename pattern i.e. the same header that you have used (I have mentioned below again) will work, provided that the CSV filenames follow the pattern specified by the regex property in batchLanguageParser bean:
INSERT_UPDATE Category;code[unique=true];name[lang=$lang];categoryFlag(code);$catalogVersion[unique=true];allowedPrincipals(uid)[default='customergroup']
Note: I have mentioned below the configuration from acceleratorservices/resources/acceleratorservices/integration/hot-folder-spring.xml for your reference:
<int:service-activator input-channel="batchFilesHeaderInit" output-channel="batchFilesHeader" ref="headerInitTask"
method="execute" />
<bean id="headerInitTask" class="de.hybris.platform.acceleratorservices.dataimport.batch.task.HeaderInitTask">
<property name="sequenceIdParser" ref="batchSequenceIdParser"/>
<property name="languageParser" ref="batchLanguageParser"/>
<property name="fallbackLanguage" value="en" />
</bean>
<bean id="batchSequenceIdParser" class="de.hybris.platform.acceleratorservices.dataimport.batch.util.SequenceIdParser">
<property name="parser">
<bean class="de.hybris.platform.acceleratorservices.util.RegexParser">
<property name="regex" value="-(\d+)\.csv" />
</bean>
</property>
</bean>
<bean id="batchLanguageParser" class="de.hybris.platform.acceleratorservices.util.RegexParser">
<property name="regex" value="-(\w{2})-(\d+)\.csv" />
</bean>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wont get all localized data in one file i will be getting files like below:
category-en.csv category-jp.csv category-de.csv category-fr.csv
Above header will not work out for me as i will receiving multiple files and each file specific to one language.
And all the files needs to go via Hotfolder only.
Please let me know if you have any other options. Thanks.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.