Try our conversational search powered by Generative AI!

How to translate groupnames with spaces?


How do i translate my groupname here?

[Display(Name = "Body", GroupName = "Main Body", Order = 400)]
		public virtual XhtmlString Content{ get; set; }

I cant have spaces in my xml like this:

    <Main Body> Content</Main Body>

Is there a solution to this?

Edited, Sep 06, 2019 10:16

I am guessing that you can't have spaces due to the W3C XML specification which strictly defines the syntax of names. 

Sep 06, 2019 10:49

Building on Maris answer, you should just remove the space:

[Display(Name = "Body", GroupName = "MainBody", Order = 400)]
public virtual XhtmlString Content{ get; set; }

Then you can translate it easily:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <language name="English" id="en">

Episerver already has a tab called content already, so you'll end up with 2 called that. You can use that one with EPiServer.DataAbstraction.SystemTabNames.Information.

Sep 06, 2019 16:03
* 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.