PHPackages                             owenmelbz/php-to-pot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. owenmelbz/php-to-pot

ActiveLibrary[Localization &amp; i18n](/categories/localization)

owenmelbz/php-to-pot
====================

Creates a .pot file for translations based off a directory of php files

0.0.3(8y ago)0136MITPHP

Since Mar 17Pushed 8y agoCompare

[ Source](https://github.com/OwenMelbz/php-to-pot)[ Packagist](https://packagist.org/packages/owenmelbz/php-to-pot)[ RSS](/packages/owenmelbz-php-to-pot/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (4)Used By (0)

PHP to .POT Generator
=====================

[](#php-to-pot-generator)

This is a really simple command line tool which generates a .pot or .po file based off language strings that it finds within the defined directory.

Currently it simply accepts 2 paths, an input - which should be a directory of templates, and an output, which is typically a .pot file.

Installation
------------

[](#installation)

1. `composer install owenmelbz/php-to-pot`

Optional
--------

[](#optional)

Create a composer script to save your little fingers e.g

```
"scripts": {
	"makepot": "./vendor/bin/php-to-pot -i ./my-template-directory -o ./translation-template.pot"
}

```

You can then just run `composer run makepot` to generate your file when needed.

Usage
-----

[](#usage)

The tool has only 2 params

1. -i/--in (a directory containing files you want to generate translations from)
2. -o/--out (the path/filename of the generated .pot)

e.g

```
./vendor/bin/php-to-pot -i ./my-templates -o translation-template.pot

```

Support
-------

[](#support)

- Magento 2
- Wordpress
- Laravel Blade
- Anything else that uses .php extension and a list of the following translation functions

\_\_ n\_\_ p\_\_ *e d*\_ dn\_\_ dp\_\_ np\_\_ dnp\_\_ noop\_\_ gettext ngettext pgettext dgettext dngettext dpgettext npgettext dnpgettext noop

Disclaimer
----------

[](#disclaimer)

Under the hood, this just interfaces with  to allow developers to generate .pot files to send to translators to create the actual .po and .mo files.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2978d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/672fbfa799365c6b8e334b066ad674e06ed4c6d68536ad2fe9be3bd565b5c601?d=identicon)[OwenMelbz](/maintainers/OwenMelbz)

---

Top Contributors

[![OwenMelbz](https://avatars.githubusercontent.com/u/1094740?v=4)](https://github.com/OwenMelbz "OwenMelbz (3 commits)")

### Embed Badge

![Health badge](/badges/owenmelbz-php-to-pot/health.svg)

```
[![Health](https://phpackages.com/badges/owenmelbz-php-to-pot/health.svg)](https://phpackages.com/packages/owenmelbz-php-to-pot)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[tio/laravel

Add this package to localize your Laravel application (PHP, JSON or GetText).

170318.5k](/packages/tio-laravel)[om/potrans

Command line tool for translate Gettext with Google Translator API or DeepL API

10515.0k4](/packages/om-potrans)[gettext/php-scanner

PHP scanner for gettext

15471.2k12](/packages/gettext-php-scanner)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
