Skip to content

Latest commit

 

History

History
67 lines (57 loc) · 1.48 KB

installation.md

File metadata and controls

67 lines (57 loc) · 1.48 KB

Installation

This section shows you how to install this bundle

Add the package to your dependencies

"require": {
    "lunetics/timezone-bundle": "2.1.*",
    ....
},

If you want the bleeding-edge version, add this instead of above:

"require": {
    "lunetics/timezone-bundle": "dev-master",
    ....
},

Register the bundle in your kernel

public function registerBundles()
    {
        $bundles = array(
            // ...
            new Lunetics\TimezoneBundle\LuneticsTimezoneBundle(),
        );

Update your packages

php composer.phar update lunetics/timezone-bundle

Configuration

Add the following lines to your app/config/config.yml

lunetics_timezone:
    guesser:
        order:
            - geo
            - locale_mapper
            - locale

PHP geoip extension

The easiest way to install the pecl geo extension is to run:

pecl install geoip

There shoult be a meta-package in your distributions, e.g. pecl-geoip port in FreeBSD or php5-geoip in Ubuntu.

Install additional geoip database

You also need to install the GeoLiteCity.dat file to use the locale guesser.