cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to load multiple language data into Hybris using Hot folder mechanism ?

Former Member
0 Likes
1,723

link text

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

arvind-kumar_avinash
Active Contributor
0 Likes

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>
Former Member
0 Likes

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.

Former Member
0 Likes

No they are not allowing me to have 17 different sets.

We need to have only 1 set of impex header and impex value and i need to load n number of languages.

Above option also not going to work out for because I already done that activiy and provided an update to my onsite team.

arvind-kumar_avinash
Active Contributor
0 Likes

I have updated my answer based on your requirement. Please check and let me know in case you face any further issue.