Download the PHP package clusteramaryllis/gettext without Composer

On this page you can find all versions of the php package clusteramaryllis/gettext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gettext

laravel-gettext

Build Status

Installation

Laravel 5.2 Installation

Add the composer repository to your composer.json file:

And run composer update. Once finished, register via service provider in config/app.php in the providers array:

You can also provide static syntax via facade in the aliases array:

Publish the configuration file (optional) (will create on config/gettext.php) :

Command

Available commands

gettext:create => Generate new .po file

gettext:update => Update existing .po file

Available options

Check with php artisan gettext:create --help or php artisan gettext:update --help

Example

This will generate .po files in resources/locale/en_US/LC_MESSAGES/messages.po & will scan any string that utilize php-gettext function on app/Http/Controllers & resources/views

Once done, you can easily translate your application using tools such as PoEdit.

How To

Simple usage

1) Prepare view with strings wrapped with Gettext method or helper

2) Add your language preferences via config/gettext.php on languages array

3) Run php artisan gettext:create. This will generate .po file in

& ready to scan translated string in app\Http\Controllers & resources\views (Default option).

4) Open the .po file with PoEdit or any similar editors. In PoEdit you need to click update to populate the table with the scanned strings. After that, you can start begin translating.

5) Simple routes test

Available methods

Methods Helper shortcut
Gettext::setLocale _setlocale
Gettext::bindTextDomain _bindtextdomain
Gettext::bindTextDomainCodeset _bind_text_domain_codeset
Gettext::textDomain _textdomain
Gettext::getText __
Gettext::nGetText _n
Gettext::dGetText _d
Gettext::dNGetText _dn
Gettext::dCGetText _dc
Gettext::dCNGetText _dcn
Gettext::pGetText _p
Gettext::dPGetText _dp
Gettext::dCPGetText _dcp
Gettext::nPGetText _np
Gettext::dNPGetText _dnp
Gettext::dCNPGetText _dcnp

More detailed method & their parameters can be seen here.

Acknowledgements

This package is inspired by laravel-gettext by Nicolás Daniel Palumbo for .po files creation & utilize php-gettext package by Danilo Segan.


All versions of gettext with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/config Version 5.2.*
illuminate/view Version 5.2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clusteramaryllis/gettext contains the following files

Loading the files please wait ....