Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
Created September 14, 2017 16:21
Show Gist options
  • Save geoffyuen/8e241b3b3cd5582be5eca3756efd763f to your computer and use it in GitHub Desktop.
Save geoffyuen/8e241b3b3cd5582be5eca3756efd763f to your computer and use it in GitHub Desktop.
Script combines your Timber/Templates/*twig files into an index.php for WPML string translation scanning. Put this script in your templates folder and run it.
#!/bin/bash
echo "<?php">index.php ; cat *.twig >> index.php
echo "Finished!"
echo "Scan your theme: WPML, Theme and plugins localization, Scan selected themes for strings"
@geoffyuen
Copy link
Author

Make it executable:

chmod +x wpml.sh

Run it:

./wpml.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment