Hi!
I´ve been looking for an answer to this problem for several days know but only got it to work "halfways". I'm developing a SharePoint hosted app with a single list in it. The app deploys to an app-web in my development enviroment and I have added an app-part that fetches items from the list and displays it in an iframe.
Everything works great except for when I try to use resource files(resx) to support multiple languages for the columns in the list.
When navigating to to app the columns that shows up in the defaultview all have correct values from in this case the default Resources.resx file that are in english, see the image below.
However when I try to add a new item the values form these columns are not picked up, seems that the app cannot get to the resource file?. Funny thing is that as you can see the dropdown-list are populated correctly using values from the same resource file.... The exact same thing happens when I deploy to a site using Swedish as default language. All the "SharePoint standard" components change language, but not this custom list and column names.
Have anyone of you encountered the same problem before? I have tried specifying values using different types of syntax, for example $Resources:_Res,MessageListDescription; and $Resources:MessageListDescription;and the same result.
Some code below.
Elements file for the fields/columns
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><Field ID="{968197c9-4964-4d63-b259-15f92cb0c173}" Name="description" DisplayName="$Resources:MessageListDescription" Type="Text" Required="FALSE" Group="Important messages"></Field><Field ID="{864F1344-547B-4FE5-B0CD-B4515F0729D7}" Name="importantMessagesStatus" DisplayName="$Resources:MessageListStatus" Type="Choice" Group="Important messages"><CHOICES><CHOICE>$Resources:MessageListStatusChoiceHigh</CHOICE><CHOICE>$Resources:MessageListStatusChoiceMedium</CHOICE><CHOICE>$Resources:MessageListStatusChoiceLow</CHOICE></CHOICES></Field></Elements>
And the content type that these columns belong to
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><!-- Parent ContentType: Item (0x01) --><ContentType ID="0x010095CDC96D0DD146A89E930624C86EED97" Name="ImportantMessagesContentType" Group="Custom Content Types" Description="My Content Type" Inherits="TRUE" Version="0"><FieldRefs><FieldRef ID="{968197c9-4964-4d63-b259-15f92cb0c173}" DisplayName="$Resources:MessageListDescription" Required="FALSE" Name="description" /><FieldRef ID="{864F1344-547B-4FE5-B0CD-B4515F0729D7}" DisplayName="$Resources:MessageListStatus" Required="FALSE" Name="importantMessagesStatus" /></FieldRefs></ContentType></Elements>
Finally, the schema file for the list
<?xml version="1.0" encoding="utf-8"?><List xmlns:ows="Microsoft SharePoint" Title="ImportantMessages" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/ImportantMessages" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE"><MetaData><ContentTypes><ContentType ID="0x010095CDC96D0DD146A89E930624C86EED97" Name="ImportantMessagesContentType" Group="Custom Content Types" Description="My Content Type" Inherits="TRUE" Version="0"><FieldRefs><FieldRef ID="{968197c9-4964-4d63-b259-15f92cb0c173}" DisplayName="" Required="FALSE" Name="description" /><FieldRef ID="{864F1344-547B-4FE5-B0CD-B4515F0729D7}" DisplayName="" Required="FALSE" Name="importantMessagesStatus" /></FieldRefs></ContentType><ContentTypeRef ID="0x01"><Folder TargetName="Item" /></ContentTypeRef></ContentTypes><Fields><Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" DisplayName="$Resources:core,Title;" Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" MaxLength="255" /><Field ID="{864F1344-547B-4FE5-B0CD-B4515F0729D7}" Name="importantMessagesStatus" DisplayName="$Resources:_Res,MessageListStatus;" Type="Text" Required="FALSE" Group="Important messages"></Field><Field ID="{968197c9-4964-4d63-b259-15f92cb0c173}" Name="description" DisplayName="$Resources:_Res,MessageListDescription;" Type="Text" Required="FALSE" Group="Important messages"></Field></Fields><Views><View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE"><Toolbar Type="Standard" /><XslLink Default="TRUE">main.xsl</XslLink><RowLimit Paged="TRUE">30</RowLimit><ViewFields><FieldRef Name="LinkTitleNoMenu"></FieldRef></ViewFields><Query><OrderBy><FieldRef Name="Modified" Ascending="FALSE"></FieldRef></OrderBy></Query><ParameterBindings><ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" /><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" /></ParameterBindings></View><View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/generic.png?rev=23" Url="AllItems.aspx"><Toolbar Type="Standard" /><XslLink Default="TRUE">main.xsl</XslLink><JSLink>clienttemplates.js</JSLink><RowLimit Paged="TRUE">30</RowLimit><ViewFields><FieldRef Name="LinkTitle"></FieldRef><FieldRef Name="description" /><FieldRef Name="importantMessagesStatus" /></ViewFields><Query><OrderBy><FieldRef Name="ID"></FieldRef></OrderBy></Query><ParameterBindings><ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /></ParameterBindings></View></Views><Forms><Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /><Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /><Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" /></Forms></MetaData></List>
I hope someone else have encountered the same problem I have!
Many thanks in advance!
//Johannes