Skip to content
PluginStats

babel-plugin-ttag weekly downloads statistics

By ttag-org · npm · Babel plugins

[![travis](https://api.travis-ci.org/ttag-org/babel-plugin-ttag.svg)](https://travis-ci.org/ttag-org) [![codecov](https://codecov.io/gh/ttag-org/babel-plugin-ttag/branch/master/graph/badge.svg)](https://codecov.io/gh/ttag-org/babel-plugin-ttag)

View on npm Fresh · Dec 6, 2026

babel-plugin-ttag has 59,937 recorded weekly downloads on npm, an increase of 18.3% over the past 30 days, ranking #738 of 3,247 tracked listings.

Weekly downloads
59,937
Official API · Dec 5, 2026
7-day growth
+13.2%
+7K weekly downloads
30-day growth
+18.3%
+9.3K weekly downloads
90-day growth
+21.2%
+10.5K weekly downloads
Rank
#738
▲ 10 in 7 days

About babel-plugin-ttag

babel-plugin-ttag

travis codecov

NPM

:warning: This project was previously named babel-plugin-c-3po. Some of the talks, presentations, and documentation may reference it with both names.

project description

Solution for providing gettext like translations into your project. Uses es6 native template syntax.

documentation - c-3po.js.org

Plugin functions:

  • extracting translations from es6 tagged templates to .pot
  • resolving translations from .po files right into your sources at compile time.

Key features: The core features of this tool are:

  • Works with GNU gettext tool (.po files).
  • Use es6 tagged templates syntax for string formatting (no extra formatting rules, no sprintf e.t.c).
  • The most intelligent gettext functions extraction from javascript sources (babel plugin).
  • Resolves translations from .po files right into your code (no runtime extra work in browser).
  • Works with everything that works with babel (.jsx syntax for instance).
  • Fast feedback loop (alerts when some string is missing translation right at compile time)
  • Designed to work with universal apps (works on a backend and a frontend).

Tutorials

Installation

npm install --save-dev babel-plugin-ttag && npm install --save ttag

gettext example

Here is how you code will look like while using this plugin:

import { t } from 'ttag';
const name = 'Mike';
console.log(t`Hello ${name}`);

So you can see that you can use native es6 template formatting. To make your string translatable, all you need to do is to place 't' tag.

Translator will see this inside .po files:

#: src/page.js:8
msgid "Hello ${ name }"
msgstr ""

Plural example

Here is how you can handle plural forms:

This function has something similar with standart ngettext but behaves a little bit different. It assumes that you have only one form in your sources and other forms will be added in .po files. This is because different languages has different number of plural forms, and there are cases when your default language is not english, so it doesn't make sense to specify 2 plural forms at all.

import { ngettext, msgid } from 'ttag';
const name = 'Mike';
const n = 5;
console.log(ngettext(msgid`Mike has ${n} banana`, `Mike has ${n} bananas`, n));

Output in .po files:

#: src/PluralDemo.js:18
msgid "Mike has ${ n } banana"
msgid_plural "Mike has ${ n } bananas"
msgstr[0] ""
msgstr[1] ""

Use case with jsx (react):

There are no additional setup for making this plugin work inside jsx. (just add babel-plugin-react plugin to your .babelrc)

import React from 'react';
import { t, ngettext, msgid } from 'ttag';

class PluralDemo extends React.Component {
    constructor(props) {
        super(props);
        this.state = { count: 0 };
        this.countInc = this.countInc.bind(this);
    }
    countInc() {
        this.setState({ count: this.state.count + 1 });
    }
    render() {
        const n = this.state.count;
        return (
            <div>
                <h3>{ t`Deadly boring counter demo (but with plurals)` }</h3>
                <div>{ ngettext(msgid`You have clicked ${n} time`, `You have clicked ${n} times`, n) }</div>
                <button onClick={this.countInc}>{ t`Click me` }</button>
            </div>
        )
    }
}

export default PluralDemo;

Disabling some code parts

If for some reason you need to disable ttag plugin transformation for some code block you can use special comment globally to disable the whole file or inside some code block (function):

/* disable ttag */

// or
function test() {
    /* disable ttag */
}

Contribution

Feel free to contribute, make sure to cover your contributions with tests. Test command:

make test

License

MIT License.

Description from the npm listing.

  • gettext
  • translations
  • babel-plugin
  • i18n

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

babel-plugin-ttag weekly downloads on npm, last 90 days: 59,937 weekly downloads as of Dec 5, 2026, +21.2% over 90 days.babel-plugin-ttagWeekly downloads on npm · Last 90 days59,937downloads / week+21.2% over 90 days020K40K60K80K100KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
babel-plugin-ttag weekly downloads on npm, last 90 days: 59,937 weekly downloads as of Dec 5, 2026, +21.2% over 90 days.

7/30/90-day growth

babel-plugin-ttag weekly downloads growth on npm: +13.2% over 7 days, +18.3% over 30 days, +21.2% over 90 days.babel-plugin-ttagWeekly downloads growth on npm59,937downloads / week now7-day growth+6,990 weekly downloads+13.2%30-day growth+9,284 weekly downloads+18.3%90-day growth+10,503 weekly downloads+21.2%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
babel-plugin-ttag weekly downloads growth on npm: +13.2% over 7 days, +18.3% over 30 days, +21.2% over 90 days.

Ranking history

babel-plugin-ttag npm ranking history: currently #738 (by weekly downloads).babel-plugin-ttagnpm ranking · by weekly downloads · Last 90 days#738current rank#640#660#680#700#720#740#760Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 16, 2026 – Dec 6, 2026 · 18 observations · Updated Dec 5, 2026pluginstats.com
babel-plugin-ttag npm ranking history: currently #738 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 37, #18 (overall #738)
All npm: every listing in weekly downloads order

Listing placement

Babel plugins263 listings · 14 pages · page 13, #11 (overall #251)
Babel plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (135)
Recent weekly downloads observations for babel-plugin-ttag
Date (UTC)Weekly downloadsChange vs. previous
59,937-464
60,401+263
60,138-2.5K
62,662+3.5K
59,132+3.3K
55,837-412
56,249+3.3K
52,947-4.3K
57,204-1.3K
58,520+2.6K
55,911-1.9K
57,804-5.7K
63,519-5.1K
68,643—

Similar npm Babel plugins plugins

All 20 babel-plugin-ttag alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/babel-plugin-ttag. First seen Nov 16, 2026; last successful collection Dec 6, 2026. See the methodology.