If there will be some other ignorant like me, searching for answers be advised you have to set VariationContext on the IVariationContextAccessor.
And you can iterate thru available languages via ILocalizationService.GetAllLanguages()
so than my implementation looks like this
var languages = localizationService.GetAllLanguages();
var items = languages.SelectMany(language =>
{
_variationContextAccessor.VariationContext = new VariationContext(language.IsoCode);
return publishedContentQuery.ContentAtRoot();
}).ToArray();
When page have several cultures it is not returned by IPublishedContentQuery
Hello,
when I call
ContentAtRoot()
fromIPublishedContentQuery
it only returns pages which are not multilanguage.Any idea how to make it return all content?
If there will be some other ignorant like me, searching for answers be advised you have to set
VariationContext
on theIVariationContextAccessor
.And you can iterate thru available languages via
ILocalizationService.GetAllLanguages()
so than my implementation looks like this
is working on a reply...