My sitecore item contains dropdown for City, state, category etc. It's all in multiple languages but on sitecore item dropdown, it's appearing in english only. I've created computed index field for all referenced dropdown. It's indexing only english language content for all languages. Below is my code to get refernce field.
internal static Item GetTargetItemsFromField(this Item item, ID fieldId)
{
if (item.Fields.Contains(fieldId))
{
ReferenceField field = item.Fields[fieldId];
if (field != null && field.TargetItem != null)
{
return field.TargetItem;
}
}
return null;
}
Code is working fine but this code (item.Fields[fieldId]) return english language always. So it's indexing english content only.
I am using below code for language in config file:
<field fieldName="_language"
storageType="YES"
indexType="TOKENIZED"
vectorType="NO"
boost="1f"
type="System.String"
settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider">
<analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" />
</field>
As per luke output it's indexing only english content for all other language.
How to fix this code to return all language content?