Skip to content

Instantly share code, notes, and snippets.

@bezysoftware
Last active September 6, 2018 09:33
Show Gist options
  • Select an option

  • Save bezysoftware/f7d87f9ff7c3675a44cc7c8d433d36a0 to your computer and use it in GitHub Desktop.

Select an option

Save bezysoftware/f7d87f9ff7c3675a44cc7c8d433d36a0 to your computer and use it in GitHub Desktop.
Download strings from getlocalition.com
$languages = "fi", "de", "cs" #... other languages
$folder = "temp"
$headers = @{ Authorization = "Basic base64-encoded-credentials" } # set the authorize header
$languages | foreach {
$lng = $_
try {
Invoke-WebRequest -uri "https://api.getlocalization.com/settle_up/api/translations/file/strings.xml/$lng/" -Headers $headers -OutFile "$folder/strings.$lng.xml"
}
catch {
Write-Error "Couldn't fetch language file '$lng'"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment