Hot answers tagged

9

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)) { ...


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: ...


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", ...


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 ...


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 ...


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.


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 ...


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.


1

You can set UpdateWebPartsPropertyName property of _VarRelationshipsListId to true, for all the target variations to automatically update from source. $guid = [Guid]$rootWeb.GetProperty("_VarRelationshipsListId"); $list = $rootWeb.Lists[$guid]; $rootFolder = $list.RootFolder; ...


1

Enable Users can manually sync updates from source variation pages on target label which will let end-users to choose which copy of page to accept, instead of overwriting them.


1

Agamand, First from the complete URL you should get the List Item, using SPWeb.GetListItem See example here: get SPListItem reference from a url Than you can use following snippet to get Terms for the Page: //retrieve the terms used for the navigation (this can be multiple terms) IList<NavigationTerm> terms = ...


1

You could use the SPWeb.Locale property of the current context (as in SPContext.Current.Web.Locale) to glean this information. If you look at the Remarks section of the CultureInfo Class description on MSDN it will explain this. A simple example would be: <a href="/<%= SPContext.Current.Web.Locale.TwoLetterISOLanguageName ...


1

I solved the problem with another method: I used SharePoints own Javascript variable - _spPageContextInfo - see: _spPageContextInfo is your new best friend ! With "currentCultureName" I could use the language name as a variable to compare to the target language and to expand my PageLayout with custom links, compliant to my variations settings. The Code ...


1

There is a built-in tool variationsfixuptool that allow to self fix issues within that variation relationship hidden list. stsadm -o variationsfixuptool -url <absolute web URL> [-fix] [-scan] [-spawn] [-showrunningjobs] [-recurse] [-label <label to fix or spawn>] In your ...


1

In your case, as you said, the size of your Content Database is not large (I assume you might also be not on production farm) therefore I would recommend you restoring the Content Database from any other server or backup source (Production) again.



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