Are there other classes like SPBuiltInFieldId and SPBuiltInContentTypeId?
Are there other built-in classes similar to SPBuiltInFieldId and SPBuiltInContentTypeId ?
I am creating a feature that will be deployed to both English and Polish site collections. It uses a custom web service - when I need to access some list or web part, I need to check the current language and use my own name ("Site Template Gallery" or "Galeria szablonów witryn", "Site Image" or "Obraz witryny ").
Is there a better way to do this?
a source to share
SPList list = pubSite.RootWeb.GetCatalog(SPListTemplateType.MasterPageCatalog);
is this something like what you are looking for?
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splisttemplatetype.aspx
Otherwise, if you are looking for a way to get the list by its internal name, you can look at this post: http://johanleino.spaces.live.com/blog/cns!6BE273C70C45B5D1!294.entry
UPDATE:
If you need to get a resource from 12 \ Template \ Resources, you can use something like:
SPUtility.GetLocalizedString("$Resources: dcl_schema_view_allitems", "core", 1053);
This will get the value from dcl_schema_view_allitems key from core.resx with swedish locale. Change according to your needs.
a source to share
So your question is more in line with the lines "How do I find the name of a SharePoint artifact in another language?"
There are two main locations:
-
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources
- The App_GlobalResources subfolder of the IIS website used by SharePoint. For instance:
C:\Inetpub\wwwroot\wss\VirtualDirectories\80\App_GlobalResources
Resource files are all XML. Find the text you want in the language you like best and pay attention to the details of the XML node. Then open the file for other languages and use XPath, LINQ, or your favorite XML technology to read the corresponding meaning in that language.
a source to share