Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unreal4u/detecting-locale-blog
This is a small example file for an entry in my blog
https://github.com/unreal4u/detecting-locale-blog
Last synced: about 2 months ago
JSON representation
This is a small example file for an entry in my blog
- Host: GitHub
- URL: https://github.com/unreal4u/detecting-locale-blog
- Owner: unreal4u
- Created: 2014-01-13T23:34:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-14T23:15:31.000Z (almost 11 years ago)
- Last Synced: 2024-10-12T05:09:23.582Z (3 months ago)
- Language: PHP
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
localeDetection
======This is an example class for a [blog post available here](http://blog.unreal4u.com/).
Disclaimer
--------This is not an official class or something that you can put right on a
production system! This is intended to be an example class for a blog post only!The blog post is available at my blog and is in spanish. You should read that
blog post first prior to using this code!Disclaimer
--------Esto no es una class oficial o algo que puedas poner en tu sistema de
producción! Sólo es un ejemplo de una class que fue escrita rápidamente para un
post en mi blog!El post del blog está disponible en mi blog y está en español. Deberías leer eso
antes de ocupar este código!Installation
--------* Execute composer with
composer.phar install
orcomposer.phar update
* This should install all dependencies
* If you don't know how to use composer or what it is, visit their [official homepage](http://getcomposer.org/).
* Download Maxmind's GeoLite2 Country database from [their website](http://dev.maxmind.com/geoip/geoip2/geolite2/).
* Use the code:include('src/unreal4u/localeDetection.php');
$localeDetection = new unreal4u\localeDetection();
$localeDetection->geoliteCountryDBLocation = '../db/GeoLite2-Country.mmdb';
var_dump($localeDetection->getLocaleFromClient());Instalación
--------* Ejecuta composer con
composer.phar install
orcomposer.phar update
* Esto debería instalar todas las dependencias.
* Si no sabes cómo usar composer o qué es, visita su [página oficial](http://getcomposer.org/).
* Baja la base de datos "GeoLite2 Country" desde la [página de Maxmind](http://dev.maxmind.com/geoip/geoip2/geolite2/).
* Usa el código:include('src/unreal4u/localeDetection.php');
$localeDetection = new unreal4u\localeDetection();
$localeDetection->geoliteCountryDBLocation = '../db/GeoLite2-Country.mmdb';
var_dump($localeDetection->getLocaleFromClient());