PHPackages                             davispuh/fuelphp-lang - 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. davispuh/fuelphp-lang

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

davispuh/fuelphp-lang
=====================

Extended Lang class for FuelPHP

1.1.1(13y ago)329UNLICENSEPHP

Since Jan 24Pushed 13y ago1 watchersCompare

[ Source](https://github.com/davispuh/FuelPHP-Lang)[ Packagist](https://packagist.org/packages/davispuh/fuelphp-lang)[ Docs](https://github.com/davispuh/FuelPHP-Lang)[ RSS](/packages/davispuh-fuelphp-lang/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Extended Lang class for FuelPHP
-------------------------------

[](#extended-lang-class-for-fuelphp)

This extended Lang class supports localized language URLs

```
http://domain/lang1/controller/method
http://domain/lang2/controller/method

```

Only Lang class is changed and without introducing any side-effects thus making it fully backward compatible and keeping FuelPHP API same, but adding additional functionality.

### Table of Contents

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Authors](#authors)
- [Unlicense](#unlicense)
- [Contribute](#contribute)

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

[](#installation)

You can install it with composer or just copy `lang.php` to your `app/classes/`

then in your `app/bootstrap.php` add

```
Autoloader::add_class('Lang', VENDORPATH . 'davispuh/fuelphp-lang/classes/lang.php');
```

or if you copied it then

```
Autoloader::add_class('Lang', APPPATH . 'classes/lang.php');
```

Usage
-----

[](#usage)

To use this extended Lang class there are required few code changes, but nothing much.

1. all links which are supposed to be for same language must be replaced with `Lang::localized($uri)`, eg. `
