Last active
January 13, 2016 22:22
-
-
Save michaellwest/7595d3ccc2511b9d4e61 to your computer and use it in GitHub Desktop.
Reports on all the content items missing a translation in Sitecore.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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