3

If I am localizing SharePoint a lot of Fields have 2 public properties:

  • Title
  • TitleResource

What is the difference between them?

Currently I am localizing a Field with this piece of code:

foreach (SPLanguage lang in InstalledLanguages) { SPField field = CurrentList.Fields.GetFieldByInternalName(FieldName); field.Title = Utility.GetSharePointResource(InternalListName, FieldName, (uint)lang.LCID); field.Update(true); field.TitleResource.SetValueForUICulture(new CultureInfo(lang.LCID), Utility.GetSharePointResource(InternalListName, FieldName, (uint)lang.LCID)); field.TitleResource.Update(); } 

As you can see, I am setting both values. Could I get away with only setting the Title or the TitleResource property?

1 Answer 1

2

As per MSDN TitleResource is the source for Title property. Usually, setting Title property sets the value for the current culture. To set the Title value for multiple culture we need to use TitleResource.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.