PHPackages                             michalsn/codeigniter-gettext - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. michalsn/codeigniter-gettext

ActiveLibrary[Localization &amp; i18n](/categories/localization)

michalsn/codeigniter-gettext
============================

Gettext support for the CodeIgniter 4 framework

v1.1.0(3mo ago)3482MITPHPPHP ^8.2CI passing

Since Jul 23Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/michalsn/codeigniter-gettext)[ Packagist](https://packagist.org/packages/michalsn/codeigniter-gettext)[ Docs](https://github.com/michalsn/codeigniter-gettext)[ RSS](/packages/michalsn-codeigniter-gettext/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (8)Used By (0)

CodeIgniter Gettext
===================

[](#codeigniter-gettext)

This library gives users the ability to use [gettext](https://www.php.net/manual/en/book.gettext.php) in a friendlier way.

[![PHPUnit](https://github.com/michalsn/codeigniter-gettext/actions/workflows/phpunit.yml/badge.svg)](https://github.com/michalsn/codeigniter-gettext/actions/workflows/phpunit.yml)[![PHPStan](https://github.com/michalsn/codeigniter-gettext/actions/workflows/phpstan.yml/badge.svg)](https://github.com/michalsn/codeigniter-gettext/actions/workflows/phpstan.yml)[![Deptrac](https://github.com/michalsn/codeigniter-gettext/actions/workflows/deptrac.yml/badge.svg)](https://github.com/michalsn/codeigniter-gettext/actions/workflows/deptrac.yml)[![Coverage Status](https://camo.githubusercontent.com/e1ff8c374388a1504b2e9edf57cb6e4df5b0c39e652933f4b4a91188bf45e9c6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d696368616c736e2f636f646569676e697465722d676574746578742f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/michalsn/codeigniter-gettext?branch=develop)

[![PHP](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)[![CodeIgniter](https://camo.githubusercontent.com/8867c0cb2bfb4e11f527658f45d11bea936efb5a06e66b10e576912cf40874e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e332d626c7565)](https://camo.githubusercontent.com/8867c0cb2bfb4e11f527658f45d11bea936efb5a06e66b10e576912cf40874e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e332d626c7565)

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- CodeIgniter 4.3 or higher
- PHP gettext extension enabled

Installation
------------

[](#installation)

#### Composer

[](#composer)

```
composer require michalsn/codeigniter-gettext

```

#### Manually

[](#manually)

In the example below we will assume, that files from this project will be located in `app/ThirdParty/gettext` directory.

Download this project and then enable it by editing the `app/Config/Autoload.php` file and adding the `Michalsn\CodeIgniterGettext` namespace to the `$psr4` array, like in the below example:

```
