Skip to content

Instantly share code, notes, and snippets.

@8ctopotamus
Last active August 11, 2019 20:45
Show Gist options
  • Save 8ctopotamus/174e2a86e3f7c17f5c513937763b7eab to your computer and use it in GitHub Desktop.
Save 8ctopotamus/174e2a86e3f7c17f5c513937763b7eab to your computer and use it in GitHub Desktop.
Genrate a .pot file for i18n from your source code.
  1. Download https://github.com/wp-mirrors/wp-i18n-tools
  2. Extract contents to /wp-includes
  3. Run following in command line to generate .pot file (Fix paths as needed)

Plugin

php wp-includes/makepot.php wp-plugin wp-content/plugins/YOURPLUGIN/ wp-content/plugins/YOURPLUGIN/YOURPLUGINSLANGFOLDER/YOURPLUGIN.pot

Theme

php wp-includes/makepot.php wp-theme wp-content/themes/YOURTHEME/ wp-content/themes/YOURTHEME/YOURTHEMESLANGFOLDER/YOURTHEME.pot

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