josantonius/wp-language

This package is abandoned and no longer maintained. No replacement package was suggested.

Load text domain plugin for translations.

1.0.2 2017-10-15 13:52 UTC

This package is auto-updated.

Last update: 2022-09-20 12:38:21 UTC


README

Latest Stable Version License

Versión en español

Load text domain plugin for translations.

Installation

The preferred way to install this extension is through composer.

To install PHP Wordpress Language library, simply:

composer require josantonius/wp-language

El comando anterior sólo instalará los archivos necesarios, si prefieres descargar todo el código fuente (incluyendo tests, directorio vendor, excepciones no utilizadas, documentos...) puedes utilizar:

composer require josantonius/wp-language --prefer-source

También puedes clonar el repositorio completo con Git:

git clone https://github.com/josantonius/wp-language.git

Requirements

This library is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.

To use this library in HHVM (HipHop Virtual Machine) you will have to activate the scalar types. Add the following line "hhvm.php7.scalar_types = true" in your "/etc/hhvm/php.ini".

Quick Start and Examples

To use this class, simply:

require __DIR__ . '/vendor/autoload.php';

use Josantonius\WP_Language\WP_Language;

Usage

Example of use for this library:

<?php
require __DIR__ . '/vendor/autoload.php';

use Josantonius\WP_Language\WP_Language;

WP_Language::load('textdomain', dirname(plugin_basename(__FILE__)).'/languages/');

echo __('Text to translate', 'textdomain');

Sponsor

If this project helps you to reduce your development time, you can sponsor me to support my open source work 😊

License

This repository is licensed under the MIT License.

Copyright © 2017-2022, Josantonius