November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
In /Resources/LanguageFiles you should have a file named ContentTypeNames.xml. In this file you put in the different strings for name and description:
Example:
<?xml version="1.0" encoding="utf-8" ?>
<languages>
<language name="Norsk (bokmål)" id="no">
<pagetypes>
<pagetype name="StartPage">
<name>Startside</name>
<description>Info om startside</description>
</pagetype>
</pagetypes>
<blocktypes>
<blocktype name="SomeBlock">
<name>Blokk</name>
<description>Info om blokk</description>
</blocktype>
</blocktypes>
</language>
<language name="English" id="en">
<pagetypes>
<pagetype name="StartPage">
<name>Start page</name>
<description>Info about the start page</description>
</pagetype>
</pagetypes>
<blocktypes>
<blocktype name="ToolLinkBlock">
<name>Block</name>
<description>Info about the block</description>
</blocktype>
</blocktypes>
</language>
</languages>
In the pages and blocks you create you don't (or shouldn't?) have to specify name and description in the ContentType attribute.
Example:
namespace Project.Models.Pages
{
[ContentType(Order = 100, GUID = "fddca5cc-dfdc-4ca4-a176-1a3e52e18490")]
public class StartPage
{
//Properties
}
}
Just to clarify Robert's response... The location of the language files is configurable in EPiServerFramework.config. If you don't have the localization provider configured, you can add it in and change around any fallback behavior:
<localization fallbackBehavior="Echo, MissingMessage, FallbackCulture" fallbackCulture="en-US">
<providers>
<add virtualPath="~/Resources/LanguageFiles" name="languageFiles" type="EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider, EPiServer.Framework" />
</providers>
</localization>
The actual name of the .XML file that you use doesn't matter. I'd name it that for organizational purposes. There's no requirements in how you name the file.
For this case though, the names of the XML elements does matter, and should be as what Robert posted.
Is it possible to add translations to ContentType parameters like DisplayName and Description?