Skip to content

Instantly share code, notes, and snippets.

@jlambe
Created May 13, 2016 06:57
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlambe/a868d9b63d70902a12254ce47069d0e6 to your computer and use it in GitHub Desktop.
Save jlambe/a868d9b63d70902a12254ce47069d0e6 to your computer and use it in GitHub Desktop.
Twig - POEdit configuration
Create a Poedit project for your theme if you haven't already, and make sure to add __ on the Sources keywords tab and other gettext functions declared in WordPress: _e, ...
Go to Edit->Preferences.
On the Parsers tab, add a new parser with these settings:
Language: Twig
List of extensions: *.twig
Parser command: xgettext --language=Python --add-comments=TRANSLATORS --force-po -o %o %C %K %F
An item in keyword list: -k%k
An item in input files list: %f
Source code charset: --from-code=%c
Save and Update!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment