Tag Info

Hot answers tagged

10

Alexanders answer is probably the way to go, but if you're being lazy and you're using 2010 (it doesn't work on 2007) you can use the numeric values. 0 = Approved 1 = Rejected 2 = Pending So Approved is <Query> <Where> <Eq> <FieldRef Name="_ModerationStatus" /> <Value Type="ModStat">0</Value> ...


8

You can add fields programmatically using list.Fields.AddFieldAsXml, providing CAML field definition with resource tokens in it. Or you can wrap SetValueForUICulture in a nice helper method, and gain a capability to use it for any SPUserResource object. We're using this approach at work, and I would not say, that it is unclear or smth like this :) It's ok, ...


7

And adding on Alexander and Ryan's answers, if you rely on the numeric value, watch out for the "4" value, that's the "scheduled" one when the contributor publishes something but SharePoint keep it in temporary draft mode until it enters its publication time frame. 0 = Approved 1 = Rejected 2 = Pending 3 = Draft 4 = Scheduled A published and approved item ...


7

To get the field always use the GUID it's the safest. And always put it into a local variable to work with: var field = customersList.Fields[SPBuiltInFieldId.Title]; To change the display name on the main language (and depending on your settings force that down on all the other languages) set the Title attribute and call Update on the field: field.Title ...


6

If you open fieldswss.xml you find the declaration of this field <Field ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}" Name="_ModerationStatus" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_ModerationStatus" Group="_Hidden" ColName="tp_ModerationStatus" RowOrdinal="0" ...


5

The resource file you are looking for are inside the ApplicationTemplateCore.wsp file, in the Config\Resources\ and Resources\ folders. Here's a detailed example for the Absence and Vacation Schedule template: Extract the files from both WSP files (technically they are CAB files) Translate the resources AbsenceVacationSchedule: Create a 1045 folder. ...


4

Although it's not quite what you're looking for, I created the 'SharePoint Language Store' (perhaps not the best name!) on Codeplex as a result of a project I worked on which had 100 SharePoint sites in around 30 languages. We also liked the idea of using a SharePoint list for such values, as the client could add translations over time and it sat well with ...


4

You can't use AppGlobalResource or <%$Resources:RESXFILE,RESOURCEKEY%> in Sandboxed solutions. See Localization in SharePoint 2010 Sandbox Solutions for how to use resources in Sandboxed solutions.


3

You can find details about <Mappings> in [MS-WSSCAML]: Collaborative Application Markup Language (CAML) Structure Specification V0.1 "MAPPINGS: A set of MAPPING string elements that represents a canonical, languageagnostic identifier for a corresponding CHOICE with the value specified by the MAPPING element. The reader MUST ignore MAPPINGS if the ...


3

Formulas and functions depend on the language of your site. It's not just about commas vs. semi-colons, the function names will change too. You can play with this example: http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/Pages/Color-Coding-Calendar-List.aspx Change the language, and you'll see how it affects the formula. For example, "IF" will ...


3

Have a look at SPUtility.GetLocalizedString()


3

When adding resources to mapped Resource folder you are placing resx files to <hive>\xx\Resources\ folder and your web part cannot access them. Proper place for this kind of resource is IIS application App_GlobalResources folder (x:\Inetpub\wwwroot\wss\VirtualDirectories\<port>\App_GlobalResources\). Fore more info you can read SharePoint ...


3

I don't think you can reference it statically like that. Try this instead: <h2><asp:Literal runat="server" ID="Literal1" Text="<%$Resources:MyProject,Test_String_Heading%>"></asp:Literal></h2> EDIT: it's $Resources versus &Resources. Thanks for picking that up Bojan! UPDATE: As noted below the $Resources method of ...


3

All Sharepoint element.xml modules are localized the same way. First of all, you need to deploy your resx files into SharePoint Resources mapped folder. After this, you can use following syntax to reference your localized resources: $Resources: ResourceFileNameWithoutExtension, ResourceName Code sample: <CustomAction Id="MyTestCustomAction" ...


3

ok, it seems that the solution is to return number as string and replace comma with dot - apparently with ProcessBatchData regional settings of the site are not used, so I had to provide the number with standard english-version format


3

take a look at this article in MSDN. It'll outline to you the procedures and limitations about localizing Sandboxed solutoins (same applies to SP 2013): Localization of Sandboxed Solutions in SharePoint 2010


2

How interesting! Test this running the latest service pack and cumulative updates. If it still occurs it is obviously a bug that you should report to Microsoft. In the meantime your best option is to correct the output from stsadm using a simple string replace before attempting to parse it as XML.


2

You could use the regular way of using string resources from SharePoint. Try the following : SPUtility.GetLocalizedString("TheResourceKey", "TheResourceFile", (uint)culture.LCID); That way, you will be able to get any resource key from any resource file!


2

Actually groups is one of the few kinds of content in SP2010 that are not translatable in MUI in SP2010, so AFAIK you are stuck with the language chosen when site collectionw was created. Content that cannot be translated: List Item Data Permission Levels (Name, Description) Groups (Name, About Me) Views (Name) OOB Web Parts OOB Properties (Appearance, ...


2

Could you not limit it to the following columns? Name (English) Name (Local) Local Language


2

First of all, a very good MSDN article about localizing SharePoint Sandboxed solutions: http://msdn.microsoft.com/en-us/library/gg615460.aspx If you will unable to perform localization through XML, take a look at a code approach: we've done this in a real project, works fine and it is easy to maintain. You will need to know: SPWeb.Lists.Add - create ...


2

In the end I have followed the direction proposed by Stuart and marked this still another SharePoint blackhole, so I have left any hope of using this CAML tag as last for now. During my research I had a look at many classes in the framework but I cannot find anything related to using the mapping "attribute", so I can only assume that it was an uncompleted ...


2

I'm building this one based on Steve answer and other links, with the major steps needed. It might be helpful for the next ones coming. Please do correct if wrong. Get the web part gallery as an SPList with GetCatalog(SPListTemplateType.WebPartCatalog) Find the item in the list corresponding to your web part, e.g. by matching on SPListItem.Name Create an ...


2

I assume you cannot install a Farm Solution which includes resource files as part of a Hybrid approach? If you can then this does get around the problem. If not: (sorry if you know this already) as you are probably aware, resources referenced in a .webpart (or.dwp) file look something like this: "$Resources:core,WebPartTitle;" where "core" refers to the ...


2

Are you trying to change the display name property of the field? Note that InternalName, display name and StaticName are all different properties of the field. And the display name property is actually called Title. customersList.Fields["Title"].Title = "Firma"; customersList.Fields["Title"].Update();


2

The .webpart file resources can only exist in the 14 Hive, and there's a reason for this and it's to do with what thread is actually running to the file system to get the resource. Whenever you use anything in the CAML Provisioning Framework (not official name), whether it's a Site Defintion, a Feature activation, a module pushing files out (like web parts) ...


2

In SharePoint 2010 WebPartZone Title property is obsolete and DisplayTitle should be used instead. Title property is declared as [Obsolete("Use DisplayTitle instead.")] public string Title { get { return this.DisplayTitle; } set { this.HeaderText = value; } } According to MSDN DisplayTitle ...


2

How do you mean? Most of the resources files can be found under C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\Resources, and hence can be altered without deploying a solution. But it is probably wise to update your resources also in your solution, to prevent it from overwriting your changes on the next deploy


2

You can create a single global resources file and deploy it to: {WebApplicationRoot}\App_GlobalResources\ This post shows you more on how to do it: http://blogbaris.blogspot.co.uk/2012/07/localization-with-sharepoint-2010-and.html The post is based on SP2010 but works just as well for SP2013


2

An interesting question! I assume you want to load the locale in javascript (in order to use it with Globalize.js). Regardless the solution I see some problems: What data source to trust: navigator.language, user prefered language in browser (Accept-Language) or SPRegionalSettings of an SPUser? What if the user locale differs from the web locale and you ...



Only top voted, non community-wiki answers of a minimum length are eligible