2017 © Pedro Peláez
 

library tld-lang

TldLang multi domain site language for Laravel 4

image

queiroz/tld-lang

TldLang multi domain site language for Laravel 4

  • Tuesday, February 11, 2014
  • by queiroz
  • Repository
  • 2 Watchers
  • 2 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

TldLang

Laravel 4 - auto select language based on domain .tld, (*1)

Installation

Add TldLang to your composer.json file:, (*2)

"require": {
    "queiroz/tld-lang": "dev-master"
}

Use composer to install this package., (*3)

$ composer update

Configuration

Registering the Package

register this service provider at the bottom of the $providers array: app.php, (*4)

'Queiroz\TldLang\TldLangServiceProvider'

Usage

Basic usage

Supose you have domain.com (English), domain2.es (Spanish), domain3.fr (French) you can simply change the system language based on this .tlds, (*5)

TldLang::set(array(
    '.com'  =>  'en',
    '.es'   =>  'es',
    '.fr'   =>  'fr'
));

and finally initialize, (*6)

TldLang::init();, (*7)

The Versions

11/02 2014

dev-master

9999999-dev https://github.com/queiroz/tldlang

TldLang multi domain site language for Laravel 4

  Sources   Download

MIT

The Requires

 

by Rodrigo Queiroz

laravel php tldlang multi domain site