PHPackages                             mikehaertl/localeurls - 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. mikehaertl/localeurls

ActiveYii-extension[Localization &amp; i18n](/categories/localization)

mikehaertl/localeurls
=====================

localeurls is a Yii extension for automatic locale/language management through URLs.

1.1.7(11y ago)105823[2 issues](https://github.com/mikehaertl/localeurls/issues)MITPHPPHP &gt;=5.0.0

Since Feb 20Pushed 10y ago6 watchersCompare

[ Source](https://github.com/mikehaertl/localeurls)[ Packagist](https://packagist.org/packages/mikehaertl/localeurls)[ Docs](https://github.com/mikehaertl/localeurls)[ RSS](/packages/mikehaertl-localeurls/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Locale URLs
===========

[](#locale-urls)

Automatic locale/language management for URLs.

This extension allows to use URLs that contain a language code like

```
/en/some/page
/de/some/page
http://www.example.com/en/some/page
http://www.example.com/de/some/page

```

Since 1.1.3 you can also configure friendlier language names if you want:

```
http://www.example.com/english/some/page
http://www.example.com/deutsch/some/page

```

The language code is automatically inserted into every URL created and read back on every request. No extra URL rules are required. For best user experience the language is also restored from session/cookie if the user returns to a URL without a language code.

Installation
============

[](#installation)

Extract the package to your `protected/extensions` directory and rename it to `localeurls`. Then configure the components in your `protected/config/main.php`:

```
