0

How to create content type for for multilingual site programatically.

Example Content type column internal name: firstName. English Display Name: First Name, German Display Name:Vorname. Same for all column name and content type name.

How can I do that?

Now how to create page layout from content type. As i am able to create page layout from content type. But for multiligual content type how can i do that? Below is my page layout module file. In that i have given content type name and content type id. But its not working

 <?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="VdePageLayout" Url="_catalogs/masterpage" RootWebOnly="TRUE">
    <File Path="VdePageLayout\VdeArticalEventPageLayout.aspx" Url="VdeArticalEventPageLayout.aspx" Type="GhostableInLibrary">
      <Property Name="Title" Value="My Custom Page Layout" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="PublishingAssociatedContentType" Value=";#$Resources:vde_Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D00D6DCE36F9DE043FE925DBA1E365BB75B;#"
/>
    </File>
  </Module>
</Elements>
  • i know about create and delete content type. But how to create column with multilingual site with different display name and internal name. – user1337886 Nov 13 '13 at 9:37
0

You can create contenttypes by code or declarative.

First create site columns and then the contenttype.

Create a feature that contains the columns and contenttype

If you want your columns multilingual you can localize your site columns and contenttypes

For example a localized field:

     <Field
           ID="{350b1356-7fef-434b-8fa2-f83b837d9c6c}"
           Name="FirstName"       
           DisplayName="$Resources:field_firstName"
           Description="$Resources:field_firstName_description"
           Group="$Resources:field_group"
           Type="Note"
           Required="FALSE"
           NumLines="6" 
           RichText="TRUE"
           RichTextMode="Compatible">
      </Field>

The same for a contenttype

      <ContentType ID="0x0100491AD40E0BEC4799A4A2015691A853F2"
                   Name="$Resources:contenttype_xxx"
                   Description="$Resources:contenttype_x_description" 
                   Group="$Resources:contenttype_group" 
                   Inherits="TRUE" 
                   Version="0">
        <FieldRefs>
          <FieldRef ID="{350b1356-7fef-434b-8fa2-f83b837d9c6c}" 
                    Required="FALSE" Name="FirstName" NumLines="6" />
            </FieldRefs>
          </ContentType>
  • How to create page layout from multilingual content type? I am able to create page layout from simple content type. But as i am giving dynamic name of content type. I am not able to create page layout from it. – user1337886 Nov 16 '13 at 9:58
  • i have edited my question – user1337886 Nov 16 '13 at 10:05
  • hello it have been a while now, sorry i have one question if we have Type="choice"for the field how can we do for the ressource File. – Imen Turki Jan 19 '17 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.