2017 © Pedro Peláez
 

library translation

Translation component based on symfony/translation

image

webforge/translation

Translation component based on symfony/translation

  • Sunday, June 29, 2014
  • by pscheit
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,056 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

webforge-translation

Coverage Status, (*1)

Wrapper around the symfony translator for standalone use, (*2)

installation

Use Composer to install., (*3)

composer require -v --prefer-source webforge/translation:dev-master

to run the tests use:, (*4)

phpunit

usage

<?php

use Webforge\Translation\ArrayTranslator;

$translations = Array(
  'de'=>Array(
    'hello'=>'Hallo Welt!'
  ),

  'en'=>Array(
    'hello'=>'Hello World!',
    'how'=>'How are you?'
  ),
);

$translator = new ArrayTranslator('de', $translations, $fallback = array('en'));

print $translator->trans('hello')."\n"; // Hallo Welt!
print $translator->trans('how')."\n"; // How are you?

$translator->setLocale('en');
print $translator->trans('hello')."\n"; // Hello World!

dependencies

  • symfony/translation 2.3

The Versions

29/06 2014

dev-master

9999999-dev

Translation component based on symfony/translation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philipp Scheit

04/11 2013

1.0.4

1.0.4.0

Translation component based on symfony/translation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philipp Scheit

13/10 2013

1.0.3

1.0.3.0

Translation component based on symfony/translation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philipp Scheit

10/06 2013

1.0.2

1.0.2.0

Translation component based on symfony/translation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philipp Scheit

04/06 2013

1.0.1

1.0.1.0

Translation component based on symfony/translation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philipp Scheit

04/06 2013

1.0.0

1.0.0.0

Translation component based on symfony/translation

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philipp Scheit