Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a site, installed my language packs, created the term store servcie and created some terms in multi-language (persian and english). I then created a site, a new list, and a new managed metadata column on that list. I then used the term sets and it's working perfectly. I can switch to both persian and english with no problem and the values of this list is changing as expected.

Despite the fact that the base template is able to switch names when I change the language, it doesn't seem to apply for user defined columns and list names. Is there a way for my user defined column title (name) to switch language the same way the values can use the term store?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

The problem is that when you create a column, the name you enter is just a constant string. SharePoint does not do translation based on known words. Internationalization is based on resource files.

And while I have used resource strings with custom list definitions, I wasn't sure if they would work on lists and columns created in the browser. So tried a quick test. I grabbed a resource string ($Resources:core,camlid2;), went to the List Settings of a list, selected a column, pasted the resource string into the Column name box, and clicked OK. Sure enough, when I returned to the List Settings page, the column name had changed to "Body".

Here are the steps I would take for creating international-able columns through the browser:

  • Create the column with the name you want as the internal name (ie, no spaces or symbols to avoid _x0020_ and other encoding replacements).
  • Edit the column by changing the column name to a resource string that you know if defined in each language you want to support.
share|improve this answer
    
Thanks a lot :) –  ar.gorgin Feb 28 '12 at 5:21
add comment

Here's how to do it programatically:

// Assuming list contains a SPList object
string fieldID = "FieldUniqueID";
list.Fields.Add(fieldID, SPFieldType.Text, false);
list.Fields[fieldID].Title = "$Resources:Example,FieldUniqueID";
list.Fields[fieldID].Update();

Note that you cannot stick "$Resources:Example,FieldNameI18N" right into Fields.Add() because hell breaks loose, since the string in Add() parameters is used for other SP stuff too, special characters get replaced, and so on.

share|improve this answer
add comment

I think this MSDN article can help you and show the easy that it is: http://msdn.microsoft.com/en-us/library/office/ff800886(v=office.14).aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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