PHPackages                             civicrm/strings - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. civicrm/strings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

civicrm/strings
===============

String extractor for CiviCRM

962911[1 issues](https://github.com/civicrm/civistrings/issues)[2 PRs](https://github.com/civicrm/civistrings/pulls)PHPCI passing

Since Jan 27Pushed 3mo ago22 watchersCompare

[ Source](https://github.com/civicrm/civistrings)[ Packagist](https://packagist.org/packages/civicrm/strings)[ RSS](/packages/civicrm-strings/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

civistrings
-----------

[](#civistrings)

civistrings is the string extractor for CiviCRM core and CiviCRM extensions. It scans PHP, Smarty, JS, and partial HTML files for references to the ts() function -- and generates a list of strings using gettext's POT file format.

Requirements
------------

[](#requirements)

- PHP 7.4+
- Composer ()

### Download: Single Executable (PHAR)

[](#download-single-executable-phar)

`civistrings` is distributed in PHAR format, which is a portable executable file (for PHP). It should run on most Unix-like systems where PHP 5.3+ is installed.

Simply download [`civistrings`](https://download.civicrm.org/civistrings/civistrings.phar) and put it somewhere in the PATH, eg

```
sudo curl -LsS https://download.civicrm.org/civistrings/civistrings.phar -o /usr/local/bin/civistrings
sudo chmod +x /usr/local/bin/civistrings
```

To upgrade an existing installation, re-download the latest `civistrings.phar`.

### Download: Git + Composer

[](#download-git--composer)

To download the source tree and all dependencies, use [`git`](https://git-scm.com) and [`composer`](https://getcomposer.org/), e.g.

```
git clone git://github.com/civicrm/civistrings.git
cd civistrings
composer install

```

The main executable is `bin/civistrings`. You may execute that file directly, or add the `bin/` folder to `PATH`, e.g.

```
export PATH=/home/myuser/civistrings/bin:$PATH

```

Usage
-----

[](#usage)

```
## Scan all recognizable files under "myfolder/"
civistrings -o myfile.pot myfolder

## Scan all *.js files
find -name '*.js' | civistrings - -o myfile.pot
```

Development
-----------

[](#development)

For a full set of development and testing activities, you will need:

- [`git`](https://git-scm.com)
- [`composer`](https://getcomposer.org/)
- [`box`](http://box-project.github.io/box2/)
- [`phpunit`](https://phpunit.de/)

> **TIP**: If you use `nix-shell`, it will provide `php`, `git`, `composer`, `box`, `phpunit8`, and `phpunit9`.

### Testing

[](#testing)

Tests are based on a series of example files (e.g. `./examples/ex1.php` and the corresponding `./examples/ex1.pot`).

To run the tests, simply call your favorite instance of `phpunit`.

### Build

[](#build)

To build a new copy of `civistrings.phar` from source, install [`git`](https://git-scm.com), [`composer`](https://getcomposer.org/), and [`box`](http://box-project.github.io/box2/) and run:

```
git clone git://github.com/civicrm/civistrings.git
cd civistrings
composer install
php -dphar.readonly=0 `which box` build

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance51

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1336047?v=4)[Tim Otten](/maintainers/totten)[@totten](https://github.com/totten)

---

Top Contributors

[![totten](https://avatars.githubusercontent.com/u/1336047?v=4)](https://github.com/totten "totten (58 commits)")[![bjendres](https://avatars.githubusercontent.com/u/3448869?v=4)](https://github.com/bjendres "bjendres (8 commits)")[![mlutfy](https://avatars.githubusercontent.com/u/254741?v=4)](https://github.com/mlutfy "mlutfy (8 commits)")[![colemanw](https://avatars.githubusercontent.com/u/2874912?v=4)](https://github.com/colemanw "colemanw (4 commits)")[![demeritcowboy](https://avatars.githubusercontent.com/u/2967821?v=4)](https://github.com/demeritcowboy "demeritcowboy (4 commits)")[![JoshuaKissoon](https://avatars.githubusercontent.com/u/1193750?v=4)](https://github.com/JoshuaKissoon "JoshuaKissoon (2 commits)")[![eileenmcnaughton](https://avatars.githubusercontent.com/u/336308?v=4)](https://github.com/eileenmcnaughton "eileenmcnaughton (1 commits)")[![seamuslee001](https://avatars.githubusercontent.com/u/6799125?v=4)](https://github.com/seamuslee001 "seamuslee001 (1 commits)")[![shaneonabike](https://avatars.githubusercontent.com/u/1126026?v=4)](https://github.com/shaneonabike "shaneonabike (1 commits)")

### Embed Badge

![Health badge](/badges/civicrm-strings/health.svg)

```
[![Health](https://phpackages.com/badges/civicrm-strings/health.svg)](https://phpackages.com/packages/civicrm-strings)
```

###  Alternatives

[summerblue/generator

Extend Laravel's generators scaffold.

34139.9k](/packages/summerblue-generator)[husseinalhammad/fontawesome-svg

PHP class to add Font Awesome 5+'s SVG icons inline without Javascript.

1811.3k](/packages/husseinalhammad-fontawesome-svg)

PHPackages © 2026

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