2017 © Pedro PelĂĄez
 

library gettext

Simple Gettext wrapper for Laravel. Based on netson/l4gettext.

image

paxx/gettext

Simple Gettext wrapper for Laravel. Based on netson/l4gettext.

  • Monday, December 11, 2017
  • by Zn4rK
  • Repository
  • 2 Watchers
  • 2 Stars
  • 3,312 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Gettext for Laravel

This library is heavliy inspired (and partially based on) netson/l4gettext and you should really use his library instead of mine., (*1)

I wrote this because I wanted to learn more about gettext (and package creating with laravel in general). I do not plan on supporting this library., (*2)

Get started

First of you need to publish the configuration, (*3)

php artisan config:publish paxx/gettext

After your changes to the config, you can go ahead and add the service provider to the list of providers in app/config/app.php:, (*4)

'Paxx\Gettext\GettextServiceProvider'

You might need to make sure that php can write to app/lang since that is the folder where the POT-files will be placed in., (*5)

To change locale you can then use:, (*6)

Gettext::setLocale('sv_SE');

Just make sure that you have the locales installed on your system., (*7)

After everything is set, you can run, (*8)

php artisan gettext

And your translations will be extracted from the views and added to the POT-file., (*9)

Dependencies

  • gettext
  • xgettext (Ships with gettext on most systems)
  • msgmerge (Ships with gettext on most systems)

Todo

  • Write tests
  • Tidy stuff up

Version

1.0, (*10)

License

MIT, (*11)

Credits

  • Netson - thanks for creating l4gettext!

The Versions

11/12 2017

dev-laravel5

dev-laravel5

Simple Gettext wrapper for Laravel. Based on netson/l4gettext.

  Sources   Download

MIT

The Requires

 

laravel laravel5 gettext

11/06 2015

dev-master

9999999-dev

Simple Gettext wrapper for Laravel. Based on netson/l4gettext.

  Sources   Download

MIT

The Requires

 

laravel laravel4 gettext