PHP code example of gettext-voo4 / robo
1. Go to this page and download the library: Download gettext-voo4/robo library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gettext-voo4 / robo example snippets
class RoboFile extends \Robo\Tasks
{
use Gettext\Robo\GettextScanner;
/**
* Scan files to find new gettext values
*/
public function gettext()
{
$this->taskGettextScanner()
->extract('templates/')
->extract('js/', '/.*\.js/') //directory + regex
->generate('Locale/gl/LC_MESSAGES/messages.mo')
->generate('Locale/es/LC_MESSAGES/messages.mo')
->generate('Locale/en/LC_MESSAGES/messages.mo')
->run();
}
}