Skip to content
i18n WordPress tools
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pomo Use binary-safe POMO_Reader::strlen() in MO::export_to_file_handle(). Jun 24, 2014
t Initial Commit Oct 12, 2013
.gitattributes Initial Commit Oct 12, 2013
.gitignore Initial Commit Oct 12, 2013
README.md Update README.md Dec 6, 2013
add-textdomain.php
extract.php Fix issues & cleanup code Oct 15, 2013
makepot.php Have makepot search for the main file of the plugin Jun 24, 2014
not-gettexted.php Fix a few issues and clean up a bit more Oct 15, 2013
pot-ext-meta.php Fix a few issues and clean up a bit more Oct 15, 2013

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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.