Skip to content

Instantly share code, notes, and snippets.

@RobsonAutomator
Created April 4, 2017 14:28
Show Gist options
  • Save RobsonAutomator/e5a974612dab13ae335900b9d6effb8b to your computer and use it in GitHub Desktop.
Save RobsonAutomator/e5a974612dab13ae335900b9d6effb8b to your computer and use it in GitHub Desktop.
Export Sitecore dictionary items for selected language.
# Author: Robert Senktas
# Description: Export Sitecore dictionary items for selected language.
$parentItem = {DC0FC646-AAB3-4D7A-B265-7AC5CDC73905}
$dialog = Read-Variable -Parameters `
@{ Name = "language"; Title = "Language"; Source="DataSource=/sitecore/system/Languages" ; Editor="droplist"} `
-Description "This script will export Dictionary data into file." `
-Width 800 -Height 600 `
-Title "Simple Dictionary Export Utility" `
-OkButtonName "Export" `
-CancelButtonName "Cancel"
if ($dialog -ne "ok")
{
Exit
}
$language = $language.Name
$dictionaryEntries = Get-ChildItem -Recurse -ID $parentItem -Language $language | Where-Object { $_.TemplateName -eq "Dictionary entry" }
$dictionaryEntries | Show-ListView -Property Name,Key,Phrase,ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment