Reputation: 1372
I'm using Saleforce.com system to develop website, in default site I call <iscontentasset aid="logo"/>
and It's work. In admin page, I Select Language is English and in my code I want to call <iscontentasset aid="logo" language="en" />
but it's not working. Please help me!
Upvotes: 1
Views: 1096
Reputation: 11
You can set request.setLocale(‘en_US’) before accessing the content asset and within content asset you can add locale specific content. After that you can reset the locale.
Upvotes: 1
Reputation: 31
First of all, there is no such possibility out of the box.
<iscontentasset aid="asset_id" />
tag itself is just another custom extension for .isml templates which is represented by dw.content.ContentMgr.getContent(parameter)
under the hood.
You can't get a localized content asset just like that cause SFCC returns localizable elements considering request.locale
attribute whilst getting from DB
Upvotes: 1
Reputation: 11
If you are working on an SFRA project, make sure you have included this template
<isinclude template="/components/modules" sf-toolkit="off" />
before using
For SG, make sure to include modules template where iscontentasset tag is declared for more details, follow below docs.
Upvotes: 1