domprojects/ci-localize

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

pkg:composer/domprojects/ci-localize

1.0.2 2024-09-24 12:11 UTC

This package is auto-updated.

Last update: 2025-09-24 15:13:15 UTC


README

Allows you to easily change and manage the language of your CodeIgniter project.

Getting Started

Prerequisites

Usage of Localize requires the following:

Installation

Installation is done through Composer.

composer require domprojects/ci-localize

Filters setup

In the app/Config/Filters.php file, add the following line:

    public array $aliases = [
        // ...
        'localize' => \App\Filters\Localize::class,
    ];

Still in the same file:

    public array $globals = [
        'before' => [
            // ...
            'localize',
        ],
    ];

App setup

In the app/Config/App.php file, modify the following line:

    public bool $negotiateLocale = false;

by

    public bool $negotiateLocale = true;

License

This project is licensed under the MIT License - see the LICENSE file for details.