2017 © Pedro Peláez
 

library circlical-po-editor

Gettext *.PO file editor and parser for PHP.

image

saeven/circlical-po-editor

Gettext *.PO file editor and parser for PHP.

  • Tuesday, September 19, 2017
  • by Saeven
  • Repository
  • 1 Watchers
  • 2 Stars
  • 2,298 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

PHP Gettext Translation Editor

Build Status, (*1)

PHP Parser/Editor for Gettext PO files, (*2)

PoEditor is a class that allows you to load / parse / manipulate / compile .po files using PHP. I built this to support a web-based PO file editor., (*3)

This repository is thoroughly tested, mosts tests were taken from raulferras/PHP-po-parser, thank you!, (*4)

It supports all of the same features, with a simpler and stable interface: * headers (HeaderBlock) * msgid (message id) * msgstr (translation strings) * msgctxt (context) * msgid_plural (plural translations) * # (flags, comments, source, references, annotations, etc.), (*5)

When you parse a po file, it transforms it into blocks that you can cleanly manipulate to thereafter compile., (*6)

Usage

Parsing Files

$po = new Circlical\PoEditor( 'file.po' );
$po->parse();

Editing Blocks

$po = new Circlical\PoEditor( 'file.po' );
$po->parse();
$po->getBlock( 'welcome' )->setMsgstr( "hola" );
$po->compile();

That transforms file.po from:, (*7)

#: wp-admin/install.php:177
msgid "welcome"
msgstr "welcome"

to:, (*8)

#: wp-admin/install.php:177
msgid "welcome"
msgstr "hola"

The Versions

19/09 2017

dev-master

9999999-dev https://github.com/saeven/circlical-po-editor

Gettext *.PO file editor and parser for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

i18n gettext po i10n

19/09 2017

0.9.1

0.9.1.0 https://github.com/saeven/circlical-po-editor

Gettext *.PO file editor and parser for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

i18n gettext po i10n

01/06 2016

0.9

0.9.0.0 https://github.com/saeven/circlical-po-editor

Gettext *.PO file editor and parser for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

i18n gettext po i10n