Per Nergård
Mar 5, 2013
  12005
(1 votes)

EPiServer localization xml files structure

In CMS7 there are a couple of new things that can be localized. I hadn’t had the time to check it out but a question in the forums   about localization of “GroupName” on page types got me curious.

Localization of page types and properties are the same as for earlier versions of EPiServer.

Blocks are new to CMS7. Thomas Krantz blogged about block localization over here but I will include it in the example below just for completeness. The example for blocks in the Alloy demo package ContentTypeNames.xml is incorrect at least in the first production release.

Groups then. The DisplayAttribute.GroupName is localized via heading elements. These headings localizes the tab names in edit mode.

I couldn’t find anything about ContentTypeAttribute.GroupName so I fired up good old reflector. It turned out that you can localize GroupName via specifying groups in the xml file.

I expected this to localize the labels for the different groups of page types  you get when creating a new page. This is not the case. What’s actually localized is the bracketed prefix on the page type when you view them in admin mode. I can’t see much use for this so I’ve checked with the support and they have an existing bug regarding that page type information localization doesn’t work so hopefully this will be fixed soon.

Below is an example lang file for reference.

<?xml version="1.0" encoding="utf-8" ?>
<languages>
 
  <language name="English" id="en">
 
    <!-- Blocks -->
    <blocktypes>
      <blocktype name="PageListBlock">
        <name>Page List</name>
        <description>Blockbeskrivning</description>
      </blocktype>
    </blocktypes>
 
    <!-- Tab headings aka GroupName in Displayattribute for a property-->
    <headings>
      <heading name="Default">
        <description>Default</description>
      </heading>
    </headings>
    
    <pagetypes>
      <!-- PropertyNames -->
      <common>
        <property name="DisableIndexing">
          <caption>Disable indexing</caption>
          <help>Help</help>
        </property>
      </common> 
      
      <!-- Page types -->
      <pagetype name="ArticlePage">
        <name>Article</name>
        <description>Help</description>
      </pagetype>
      
      <!-- Groupname in ContentTypeAttribute-->
      <groups>
        <group name="Test">Prefix</group>
      </groups>
    </pagetypes>
  </language>
 
</languages>
Mar 05, 2013

Comments

Apr 23, 2013 01:37 PM

Update: (It seems I can't edit old posts with live writer from another computer so a comment have to be sufficient).

if you wan't to localize propertynames on a per type basis the format is like this. The pagetype element name attribute can be both the name of a pagetype as well as a blocktype.




Caption
HelpText


janaka.podiralahamy
janaka.podiralahamy Nov 18, 2013 05:02 PM

i am able to see my changes on page types but not with blocks. can you help? thanks!

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024