filippo-f
11/6/2016 - 11:25 PM

Localize WordPress themes and plugins (https://github.com/Phoenix2k/wp-theme-localization)

Localize WordPress themes and plugins (https://github.com/Phoenix2k/wp-theme-localization)

// To start Grunt, open a new terminal window and type the following in the project folder:
//
$ grunt

// After the theme-name.pot file has been generated, 
// you can start creating copies and rename them as {lang}.po or {lang}_{COUNTRY}.po. 
// Avoid using .pot as the extension.
// Open Gruntfile.js and configure the paths to your theme folder:

data: {
    config: {
        theme: {
            php_files   : 'path-to-your-theme',
            lang_files  : 'path-to-your-theme/languages',
            text_domain : 'theme-name'
        }
    }
},

// <?php _ex( 'Posted on %s', 'Post date', 'theme-name' ); ?>
#To create a local copy of the project, go to a preferred location and type:
#
$ git clone https://github.com/Phoenix2k/wp-theme-localization.git

#To install all the required node modules, go to the project folder and type:
#
$ npm install