2017 © Pedro Peláez
 

library losi18n

I18N middleware providing route and country, region and language lists in all languages

image

los/losi18n

I18N middleware providing route and country, region and language lists in all languages

  • Friday, August 19, 2016
  • by Lansoweb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,413 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 14 % Grown

The README.md

LosI18n

Introduction

This middleware provides list of Languages, Countries and Regions translated to all languages., (*1)

Requirements

PHP 7.1+ and any container-interopt compatible project., (*2)

Instalation

composer require los/losi18n

Optionally, copy the config file to your project., (*3)

I18n Data

This module needs data from losi18n-data. So you need either to add the module to you project:, (*4)

Adding the losi18n-data

composer require los/losi18n-data

File format

There are 3 formats: php, json and csv. If you need to import the json file, it's located: vendor/los/losi18n-data/data//languages.json vendor/los/losi18n-data/data//countries.json vendor/los/losi18n-data/data//regions.json, (*5)

Usage

Language list

$languagesService = $sm->get('losi18n-countries');
// All languages translated to pt_BR
$languages = $countriesService->getAllLanguages('pt_BR');
// All languages in their native names
$languages = $countriesService->getNativeLanguages();
// Brazilian Portuguese in English
$language = $countriesService->getLanguage('pt_BR', 'en);

Country list

$countriesService = $sm->get('losi18n-countries');
// All officially assigned countries translated to English
$countries = $countriesService->getAllCountries('en');
// All countries translated to English
$countries = $countriesService->getAllCountries('en', false);
// United States translated to Brazilian Portuguese
$country = $countriesService->getCountry('US','pt_BR');

Region list

$regionsService = $sm->get('losi18n-regions');
$regions = $countriesService->getAllRegions('pt_BR');

The Versions

19/08 2016

dev-master

9999999-dev http://github.com/Lansoweb/LosI18n

I18N middleware providing route and country, region and language lists in all languages

  Sources   Download

MIT

The Requires

 

language i18n country los

19/08 2016

2.0.0

2.0.0.0 http://github.com/Lansoweb/LosI18n

I18N middleware providing route and country, region and language lists in all languages

  Sources   Download

MIT

The Requires

 

language i18n country los

19/08 2016

dev-develop

dev-develop http://github.com/Lansoweb/LosI18n

I18N middleware providing route and country, region and language lists in all languages

  Sources   Download

MIT

The Requires

 

language i18n country los

16/12 2015

1.0.x-dev

1.0.9999999.9999999-dev http://github.com/Lansoweb/LosI18n

I18N module for ZF2 applications providing route and country, region and language lists in all languages

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

language zf2 module i18n country los

16/12 2015

1.0.1

1.0.1.0 http://github.com/Lansoweb/LosI18n

I18N module for ZF2 applications providing route and country, region and language lists in all languages

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

language zf2 module i18n country los

11/06 2015

1.0.0

1.0.0.0 http://github.com/Lansoweb/LosI18n

I18N module for ZF2 applications providing route and country, region and language lists in all languages

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

language zf2 module i18n country los