How to translate groupnames with spaces?

Vote:
 

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:

<groups>
    <Main Body> Content</Main Body>
</groups>

Is there a solution to this?

#206994
Edited, Sep 06, 2019 10:21
Vote:
 

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

#206997
Sep 06, 2019 10:49
Vote:
 

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"?>
<languages>
    <language name="English" id="en">
        <groups>
            <mainbody>Content</mainbody>
        </groups>
    </language>
</languages>

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.

#207036
Sep 06, 2019 16:03