2017 © Pedro Peláez
 

library language

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library.

image

jaeger-app/language

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library.

  • Wednesday, November 30, 2016
  • by mithra62
  • Repository
  • 1 Watchers
  • 0 Stars
  • 401 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Jaeger Language Object

Build Status Scrutinizer Code Quality Author GitHub license, (*1)

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library., (*2)

Installation

Add jaeger-app/language as a requirement to your composer.json:, (*3)

$ composer require jaeger-app/language

Simple Usage

To get started with JaegerApp\Language you pass system paths to directories containing language files which are used for a simple replacement., (*4)

$lang = new Language;
$lang_path = '/path/to/language/files';
$lang->init($lang_path);

echo $lang->__('backup_success_message');

You can also pass an array of paths to the constructor to bulk load language files, (*5)

$paths = array(
    '/path/to/language1',
    '/path/to/language2',
    '/path/to/language3'
);
$lang = new Language($paths);

Language File Format

The language files are a simple key => value array called $lang, (*6)

$lang = array(
    'backup_success_message' => 'Backup Complete!',
    'backup_fail_message' => 'Backup Failed...',
);

You can store multiple language files in the same directory as well as add multiple directories so keeping content organized shouldn't hurt too much., (*7)

The Versions

30/11 2016

dev-master

9999999-dev

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Eric Lamb

30/11 2016

0.1.2

0.1.2.0

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Eric Lamb

05/07 2016

0.1.1

0.1.1.0

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Eric Lamb

20/04 2016

0.1

0.1.0.0

A simple language abstraction to simply keep copy out of your code. This is NOT a translation library.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Eric Lamb