Skip to content

frc/wp-webpack-translation-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Webpack translation plugin

Requirements

  • webpack
  • gettext

Installation

npm i wp-webpack-translation-plugin

Usage

You need to require the plugin in the webpack.config.js like so:

const WpTranslationPlugin = require('wp-webpack-translation-plugin');

And add this to the plugins array of the configuration:

new WpTranslationPlugin({
    domain   : '[your language domain name]',
    phpDirectories: [
        '[path to theme]/**/*.php'
    ],
    languagesDirectory : '[directory where the .pot, .po and .mo files reside]'
})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%