Try our conversational search powered by Generative AI!

Translate IList property

Vote:
 

Is it possible to translate properties in a ListProperty?
I would like to translate the Heading and Text property in the ExpandableModel. I've tried this but that will only translate the Items property...



	
		
			
				Lista med expanderbara rubriker
				Block för att skapa lista med rubriker som kan fällas ut
			
			
				
					
						Rubrik
					
					
						Lista med expanderbara rubriker
					
                    
					    
						    Translated Heading
					    
			        
				
			
		
	
public class ExpandableListBlock : BlockData {
    [Display(Order = 10)]
    [CultureSpecific]
    public virtual string Heading { get; set; }
 
    [Display(Order = 20)]
    [EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor))]
    public virtual IList Items { get; set; }
}
public class ExpandableModel {
    [UIHint(UIHint.Textarea)]
    public virtual string Heading { get; set; }
    public virtual XhtmlString Text { get; set; }
}




#147759
Apr 25, 2016 10:14
Vote:
 

Yes, just add attribute [Display(Name = "/your/path/to/translation/heading")] to the property.

#197406
Oct 02, 2018 11:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.