[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/scripts/ -> import.php (source)

   1  <?php
   2  require_once dirname( dirname( __FILE__ ) ) . '/gp-load.php';
   3  
   4  class GP_Script_Import extends GP_Translation_Set_Script {
   5      
   6  	function __construct() {
   7          $this->short_options .= 'f:';
   8          $this->usage = '-f <po-file> '.$this->usage;
   9          parent::__construct();
  10      }
  11      
  12  	function action_on_translation_set( $translation_set ) {
  13          $po = new PO();
  14          $po->import_from_file( $this->options['f'] );
  15          $added = $translation_set->import( $po );
  16          printf( _n( "%s translation were added\n", "%s translations were added\n", $added ), $added );
  17      }
  18      
  19  }
  20  $gp_script_import = new GP_Script_Import;
  21  $gp_script_import->run();


Generated: Thu May 24 03:59:35 2012 Hosted by follow the white rabbit.