Skip to content

Instantly share code, notes, and snippets.

@michaellwest
Last active January 13, 2016 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaellwest/7595d3ccc2511b9d4e61 to your computer and use it in GitHub Desktop.
Save michaellwest/7595d3ccc2511b9d4e61 to your computer and use it in GitHub Desktop.
Reports on all the content items missing a translation in Sitecore.
<#
.SYNOPSIS
Reports on all the content items missing a translation in Sitecore.
#>
$languageNames = Get-ChildItem -Path "master:\" -ID ([Sitecore.ItemIDs]::LanguageRoot) |
Select-Object -ExpandProperty Name
$groups = Get-ChildItem -Path "master:\content\" -Recurse -Language * | Group-Object -Property Name | Where-Object { $_.Count -lt $languageNames.Count }
$reportData = @()
foreach($group in $groups) {
$missingLanguageNames = $languageNames | Where-Object { $group.Group.Language -notcontains $_ }
$item = $group.Group | Select-Object -First 1
Add-Member -InputObject $item -MemberType NoteProperty -Name "Missing Language" -Value ($missingLanguageNames -join "<br/>")
$reportData += $item
}
$reportData | Show-ListView -Property Name, "Missing Language"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment