on 07-10-2015 3:25 PM
We need to set the default value for language attribute for customized type in hmc.
<deployment table="CustomKwrdRedir" typecode="10001" />
<attributes>
<attribute qualifier="name" type="java.lang.String">
<description>Name</description>
<persistence type="property" />
</attribute>
<attribute qualifier="page" type="SolrAbstractKeywordRedirect">
<description>Stores the Redirect page</description>
<persistence type="property" />
</attribute>
<attribute qualifier="keywords" type="solrFacetSearchKeywordRedirectList">
<description>Stores the list of keywords having the same Redirect</description>
<persistence type="property" />
</attribute>
<attribute type="Language" qualifier="sessionLanguage">
<modifiers read="true" write="true" optional="true" search="true" />
<!-- <defaultvalue>de.hybris.platform.jalo.c2l.C2LManager.getInstance().getLanguageByIsoCode("English")</defaultvalue> -->
<persistence type="property" />
</attribute>
</attributes>
</itemtype>
The above declaration is not working. We know this can be set using the initdefaultinterceptor. But is there any better approach to do it.
Appreciate the help.
Hi Dhakshayani ,
The way you has selected to set the default language seems correct. please make sure to put the correct IsoCode (en or en_US) as listed down in the code below.
<attribute type="Language" qualifier="sessionLanguage">
<modifiers read="true" write="true" optional="true" search="true" />
<defaultvalue>de.hybris.platform.jalo.c2l.C2LManager.getInstance().getLanguageByIsoCode("en")</defaultvalue>
<persistence type="property" />
</attribute>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
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.