Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-po-requirejs-i18n with all npm packages installed. Try it out:

var gulpPoRequirejsI18n = require("gulp-po-requirejs-i18n")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-po-requirejs-i18n v0.2.0

Utility to convert PO files to requirejs-i18n files with Gulp

gulp-po-requirejs-i18n

Utility to convert PO files to requirejs-i18n files with Gulp.

Usage

var gulp = require('gulp'),
    poRequire = require('gulp-po-requirejs-i18n');

gulp.task('i18n', function() {
    return gulp
        .src('locales/*.po')
        .pipe(poRequire([options]))
        .dest('dist/locales');
});

Options

  • name: (default: 'strings') The name prefix for converted files.

  • root: (default: false) If true, put translations in a root key, and add prefix to translations values (t_ by default).

  • rootPrefix: (default: t_) A prefix that will be added to translations values in root mode.

  • supported: (default: []) Output keys for supported languages, only if root is enabled.

  • omitEmptyString: (default: true) Do not output keys for PO translations with an empty string.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free