i18n WordPress tools
Pull request Compare This branch is even with grappler:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pomo
t
.gitattributes
.gitignore
README.md
add-textdomain.php
extract.php
makepot.php
not-gettexted.php
pot-ext-meta.php

README.md

i18n

i18n WordPress tools

Goal

  • Improve makepot.php so that are no error reports.
  • Allow add-textdomain.php to add text domain to multiple files
  • To create a WordPress plugin out of this.

Features

  • create POT with strings and translator texts
  • add text domain to strings

Documentation

Installation

To get it running you need to download the files, clone or fork the repo.

Create a pot file for themes

Change the directory in command line to where the POT file should be created. Paste this code in the command line.

php C:\path\to\i18n\makepot.php wp-theme C:\path\to\theme-folder\

Create a pot file for plugins

Change the directory in command line to where the POT file should be created Paste this code in the command line.

php C:\path\to\i18n\makepot.php wp-plugin C:\path\to\plugin-folder\

Add a text domain

Change the directory in command line to where the text domain should be added to the strings in the file. Paste this code in the command line.

php C:\path\to\i18n\add-textdomain.php -i text-domain file.php

or

php C:\path\to\i18n\add-textdomain.php -i text-domain file.php > new-file.php

Files

The pomo folder is part of WordPress core. As it is a important part of this project I have inlcuded it here so that it can be edited as needed.

Contribute

Contributions

WooCommerce has been great help. I was able to use some of the fixes from there.

Support

If you are having issues, please let us know. You can report them in the issues tracker.

License

The project is licensed under the GPL-2.0+ license.