PHPackages                             joel-depiltech/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. joel-depiltech/codeigniter-gettext

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

joel-depiltech/codeigniter-gettext
==================================

A Codeigniter PHP framework package for dealing with gettext as a Composer requirement.

1.0.0(9y ago)62651GPL-2.0PHPPHP &gt;=5.6

Since Dec 23Pushed 8y ago2 watchersCompare

[ Source](https://github.com/joel-depiltech/codeigniter-gettext)[ Packagist](https://packagist.org/packages/joel-depiltech/codeigniter-gettext)[ Docs](https://github.com/joel-depiltech/codeigniter-gettext)[ RSS](/packages/joel-depiltech-codeigniter-gettext/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

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

[](#codeigniter-gettext)

[![Latest Stable Version](https://camo.githubusercontent.com/23b4f40054cb16e5385e881daf8cdd0ea64fe412be1df9eee242aa9370ed88e0/68747470733a2f2f706f7365722e707567782e6f72672f6a6f656c2d646570696c746563682f636f646569676e697465722d676574746578742f762f737461626c652e737667)](https://packagist.org/packages/joel-depiltech/codeigniter-gettext)[![Build Status](https://camo.githubusercontent.com/56eecee2d388dec6b837868aca134423c804b7688f35c0bd42b001adab67a6f9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f656c2d646570696c746563682f636f646569676e697465722d676574746578742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/joel-depiltech/codeigniter-gettext/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/2fd856c48b19a456aacc1cf307e2bfda46d7543cfbdb8e00e796ba1e67c6edf1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f656c2d646570696c746563682f636f646569676e697465722d676574746578742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/joel-depiltech/codeigniter-gettext/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0602a2d7aedabbadb55443ba82f1a266374459c2aa15fa96cc0d3e8533170ca3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f656c2d646570696c746563682f636f646569676e697465722d676574746578742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/joel-depiltech/codeigniter-gettext/?branch=master)[![License](https://camo.githubusercontent.com/77f7efadbbe018aae212580830546d75eda3a47b0c1a69248c12d62352e62476/68747470733a2f2f706f7365722e707567782e6f72672f6a6f656c2d646570696c746563682f636f646569676e697465722d676574746578742f6c6963656e7365)](https://packagist.org/packages/joel-depiltech/codeigniter-gettext)

This is [CodeIgniter](https://codeigniter.com) PHP framework package for dealing with [Gettext](https://www.gnu.org/software/gettext/).

This package is a fork from [Marko Martivović](https://github.com/Marko-M/codeigniter-gettext) library.

Please use [Composer](https://getcomposer.org) to install it and include it as a package in your CodeIgniter application.

Instructions
------------

[](#instructions)

Please note that following steps assume that you have correctly installed gettext and configured Codeigniter on your server.

1. Use **composer** to install this package

`composer require joel-depiltech/codeigniter-gettext`

2. Add this **package** to auto-load packages array (application/config/autoload.php)

`$autoload['packages'] = array(FCPATH . 'vendor/joel-depiltech/codeigniter-gettext/src');`

or include it with Loader library

`$this->load->add_package_path(FCPATH . 'vendor/joel-depiltech/codeigniter-gettext/src');`

3. Add default **configuration** file to auto-load config array (application/config/autoload.php)

`$autoload['config'] = array('gettext');`

or include it with Loader library

`$this->load->config('gettext');`

4. Add the **library** to auto-load library array (application/config/autoload.php)

`$autoload['library'] = array('gettext');`

or include it with Loader library

`$this->load->library('gettext');`

5. Add the **helper** to auto-load library array (application/config/autoload.php)

`$autoload['helper'] = array('gettext');`

or include it with Loader library

`$this->load->helper('gettext');`

6. Create gettext locales directory according to your `gettext_locale_dir` (application/language/locales by default). Inside that directory **create `locale_name/LC_MESSAGES` path for each of your locales** and place your .mo files inside.

This is an example how to load Library overwriting default configuration:

```
