1

I'm making an app with a custom list in multiple languages.

Is there an easy way so that I only have to create the site columns, content type and list once? So I don't have to create them for each language?

My app will be in English, French and Dutch.

My lists elements.xml looks like this

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List project item, an error will occur when the project is run. -->
    <ListTemplate
        Name="List1"
        Type="10000"
        BaseType="0"
        OnQuickLaunch="TRUE"
        SecurityBits="11"
        Sequence="410"
        DisplayName="List1"
        Description="My List Definition"
        Image="/_layouts/15/images/itgen.png"/>
  <Field
      Name="Adres"
      ID="{2a32d9eb-ad3b-4dbb-abba-66dd01ca7c6e}"
      DisplayName="$Resources:Adres"
      Type="Text"
      Required="TRUE" />
  <Field
      Name="Naampje"
      ID="{ac47be45-2f43-4d16-9a06-162c85945ec9}"
      DisplayName="$Resources:Naampje"
      Type="Text"
      Required="FALSE" />
  <Field
    Name="Nickname"
    ID="{6B0A2CD7-A7F9-41ca-B932-F3BEBB603793}"
    DisplayName="$Resources:Bijnaam"
    Type="Text"
    Required="FALSE" />

</Elements>

Well if i change my language in Sharepoint (Office 365) it's not changing the titles from dutch to the other languages i have added.

2 Answers 2

2
  • You will need to create a resx file for each language. Here is an ASP.NET example.
  • Then create the Name-Value pairs in the resex files. I might want to define a customer site column for to display a customer name. In the English file I would define it as Customer = Customer then in the Dutch rexx I would define it as Customer = Klant, etc. The important thing is that the Name (or Key) must be the same in all the resx files. If your first language is dutch then you might define the resx Name-Value pairs as Klant = Customer, and the Dutch as Klant = Customer, etc.
  • When you define your site columns do it so that they reference the resource files. DisplayName="$Resources:Customer"
  • Create your content type as you normally would so that it references your site columns.
  • Create your list definition as you normally would referencing your custom content types.

And there you have it! It's actually pretty easy.

0

To localize components that are deployed to an app web, you add .resx files as local resources in the Feature that contains the components, and then reference the resources in the markup of the component. However, custom site pages in an app for SharePoint use JavaScript string variable files instead of .resx files, as described later in this section.

Please refer these for more information: http://msdn.microsoft.com/en-us/library/office/fp179919(v=office.15).aspx http://blogs.msdn.com/b/ocarpen/archive/2012/08/28/how-to-localize-sharepoint-hosted-apps-for-sharepoint-2013-with-jquery.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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