Created
December 5, 2011 10:24
-
-
Save elebescond/1433137 to your computer and use it in GitHub Desktop.
Generate a pot template from a wordpress theme - xgettext
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -iname "*.php" > /tmp/my_theme_file_list.txt | |
# new template | |
xgettext --from-code=utf-8 -d my_theme -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot | |
# update template | |
xgettext --from-code=utf-8 -d my_theme -j -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ xgettext --from-code=utf-8 --keyword=__ -o ./wp-content/languages/themes/THEME-ru_RU.po ./wp-content/themes/THEME/*.php