Hot answers tagged

9

How to create Variation Labels in SharePoint 2013/Online via CSOM SharePoint 2010/2013 CSOM API does not expose any specific methods for creating Variation Labels, but you could use the following class for that purpose. VariationsClient class is intended for managing Variation Labels in SharePoint 2013. The following operations are currently supported: ...


8

I think the simplest method is to get the list using PublishingPage.VariationPageUrls. It gets a StringCollection object of URLs that point to Variation peer PublishingPage objects associated with this PublishingPage object. So in your code, it would be something like.. if (PublishingPage.IsPublishingPage(SPContext.Current.ListItem)) { ...


5

MUI and Variations are 2 different concepts in SharePoint 2010! They both rely on Language packs to properly work, but the purpose is different: MUI only handles UI elements such as Menu Items, Actions Links down to Column Headers (most OOTB are automatically translated, but you need to export Resource files for your own columns) Variations handle CONTENT ...


5

The logic is contained in VariationRoot.aspx which by default redirects users according to language and cookie settings by means of a custom control in the page layout (VariationRootPageLayout.aspx). You have a number of options for customising this logic if required, including replacing the custom control or adding some client-side logic using JavaScript, ...


5

You need to set correct properties while creating Variation Labels, see example for Swedish label (c#) when both Machine and Human Translations are enabled using MachineTranslationEnabled and HumanTranslationEnabled Title = "sv-SE", FlagControlDisplayName = "Svenska", Language = "sv-SE", ...


3

Take a look to this link that explain How propagation works: http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/12/sharepoint-2013-variations-content-synchronization-between-source-and-target-variations.aspx Also check the timer jobs that are responsible of the propagations and the Variations log. From the link: Custom lists and ...


3

It actually depends what version of SharePoint is used. How to retrieve Variation Labels via CSOM? Since variations labels are stored in a Hidden List (MOSS 2007, SPS 2010/2013) we could retrieve it via CSOM (ECMAScript) as demonstrated below: function getVaritationLabels(OnSuccess,OnError){ var ctx = SP.ClientContext.get_current(); var rootWeb = ...


3

When you enable variations in your site collection, there is a file created in the pages Library called: VariationRoot.aspx. When you open this file, you will be redirected to the write site. You have to set this page as your home page, so that everytime a user visits your site, he will be redirected to the correct site. You can set it has homepage either ...


3

As I understand it, XSL is server-side and JS is client-side so you are trying to mix two incompatible layers. What you can do is include a reference to a JS script within your XSL which will then run against the rendered output. In the example you mention, you could potentially render both language versions using your XSL and then hide whichever you ...


3

I did some test and I found out that after creating variations with automatic propagation it is way too difficult to change them. If you configure variation settings with automatic variations set ti off BEFORE creating hierarchies it works.


3

First a disclaimer: the below notes are a pure recollection from memory of a project I was involved back in 2008. Assuming http://mydomain.com/en/pages/introduction.aspx is your publishing master variation page. This page contains a hidden text field named "PublishingVariationGroupID". This field contains a GUID which can be used to locate all matching ...


3

The supported limit is still 50 in SP 2010


3

The Variations mechanism is very rigid. As soon as you have very specific requirements, it's likely not to be possible (out of the box). Variations work only within an individual site collection. You can't have variation labels living outside your site collection which has the Variations set up. I would look into options that allow you to make it appear as ...


2

Yes, you're quite right that SharePoint doesn't deal particularly well with this requirement out-of-the-box. If you wish to go beyond separating authoring/reading (typically accomplished with Content Deployment) and use different branding, then the only option is to do a fair amount of custom development. In the end it comes down to using SharePoint mainly ...


2

As a suggestion, I think that in this case you probably want to disable automatic propagation, and explicitly propagate the pages you want to be translated, rather than have everything propagated and then try to undo some of them. You have to do this with PowerShell - there is no option in the UI. $site = Get-SPSite "URLofVariationSiteCollection" $folder = ...


2

Variations will create the sites for you, you do not create the subsites for each locale manually. This blog post has extensive information around Variations and what the settings mean: http://blog.consejoinc.com/2011/01/creating-multilingual-sites-in.html Variations can be very fragile and easy to break, so it's a good idea to plan from the outset if ...


2

No this is not possible since it would introduce overlap between labels / the navigation hierarchy.


2

SpContext.CurrentWeb.Language always returns languages that is used for site creation, if you would like to change languages on your site dynamically you should use `Thread.CurrentCulture.LCID'. If you would like to get this values in .aspx file, you should create module that deploys resources files to the GlobalResources folder. See this post how to do it. ...


2

You need to run additional timer jobs. For the root variation (in your case english), running the Variations Create Hierarchies Job Definition is sufficient to create the hierarchy. For all additional variation labels you need to start additional timer jobs. In central administration you should see these 4 timer jobs related to variations (per web ...


2

There isn't an "out-of-the-box" way to accomplish this. However, you could create your own custom Site Map Provider and in your code get the data from the Managed Metadata Service. Then you can modify the information however you need to. Here is some info to get you started: TaxonomySession (How you get the metadata): ...


2

Ok I found out I needed to set search setting in "Site Collection" which solved the problem.


2

When you create a custom list definition with a new id you loose some out of the box functionality that are coupled to a base template. Best to create a list instance with a custom schema. This way you can deploy youre customized list and keep all the functionality. Second way is to create youre definition with the same type. But thats not recommanded.


2

While creating the target label you can let SharePoint know how you want existing pages to be updated, when the changes are being done to the actual source page Users can manually sync updates from source variation pages will let end-users to choose which one to accept. Automatically update target variation pages will automatically update the target ...


1

If I remember correct, when using variation sites SharePoint sync the sites so they are identical. If something is missing in one variation site it will be removed from all variation sites. If you have webparts which should only be available for one language group, try and see if you can use audience instead.


1

To get the peer page of the page that you are currently in Use the below method:- ReadOnlyCollection<VariationLabel> spawnedLabels = Variations.Current.UserAccessibleLabels; foreach (VariationLabel label in spawnedLabels) { try { if (!currentUrl.StartsWith(label.TopWebUrl, ...


1

After some digging, I managed to resolve the problem. I found this article on the Microsoft MSDN site. One section in particular caught my eye: By default, the .cmp files are limited to 24 MB in size, although you can change this value using the FileMaxSize property. If set to zero, the value resets to the default. This stood out to me right away as ...


1

Check this link for a possible solution. Relevant part: Uncheck the option for 'updating workflow status to list automatically'. This is in designer, on the page having option 'Edit the workflow' This is for point 2 of your question.


1

​Minimal Download Strategy, a new feature implemented in SharePoint 2013 to improve the performance. It is activated by default in SharePoint site. It's a technique to use single page "_layouts/15/start.aspx" with URL encoded with following # text. Minimal Download Strategy will improve the performance of SharePoint site by improving Navigation, Fast ...


1

Multi-lingual sites can be implemented in Office 365 but it depends if you want to translate content + labels or labels-only. If you're interested in translating content + labels between different languages then I suggest variations is not a bad option at all. The only down-side is that you get subsites created for different languages instead of site ...


1

The parameter count for getPeerUrl() is wrong. According to the documentation (even if it is ambiguous) you must pass the current URL (server relative) and variation label too. Check the JS function signature SP.Publishing.Variations.getPeerUrl, it takes 3 parameters. Try this ExecuteOrDelayUntilScriptLoaded(VariationHandler2, "SP.publishing.js"); ...



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