Localize page type and page property names in EPiServer
This post shows how to translate page type and property names and descriptions to have them appear in the correct language in the editor interface when globalization is enabled for an EPiServer web site.
This results in the following approach to handling properties including their appearance in the edit interface:
<?xml version="1.0" encoding="utf-8" ?>
<languages>
<language name="English" id="EN">
<pagetypes>
<common>
<property name="MyPageProperty">
<caption>My Page Property</caption>
<help>This is a page property used for demos</help>
</property>
</common>
</pagetypes>
</language>
<language name="Svenska" id="SV">
<pagetypes>
<common>
<property name="MyPageProperty">
<caption>Min sidegenskap</caption>
<help>Detta är en sidegenskap för demosyften</help>
</property>
</common>
</pagetypes>
</language>
</languages>
In addition to page property edit headings and help texts you will want to have the page type names appear in the correct language in the edit interface.
In order to have the translated page type names and descriptions appear in the edit interface you complement your XML language file with the following:
<?xml version="1.0" encoding="utf-8" ?>
<languages>
<language name="English" id="EN">
<pagetypes>
<pagetype name="MyPageType">
<description>This is my demo page type</description>
<name>[Demo] My Page Type</name>
</pagetype>
</pagetypes>
</language>
<language name="Svenska" id="SV">
<pagetypes>
<pagetype name="MyPageType">
<description>Detta är min demo-sidtyp</description>
<name>[Demo] Min sidtyp</name>
</pagetype>
</pagetypes>
</language>
</languages>