2017 © Pedro Peláez
 

library translation

Support multi-lingual in YOUR application! :D

image

thru.io/translation

Support multi-lingual in YOUR application! :D

  • Thursday, January 28, 2016
  • by matthewbaggett
  • Repository
  • 1 Watchers
  • 0 Stars
  • 438 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Translation Library

Support multi-lingual in YOUR application! :D, (*1)

Install like so:, (*2)

composer require "thru.io/translation": "dev-master"

Setup like so:, (*3)

use \Thru\Translation\Translation;
Translation::setOriginalLanguage('en-gb');
Translation::setTargetLanguage('fr'); 

You will note you are responsible for deciding what the target language will be! Be that browser-detection or user-agent sniffing or giving the user a language selection or whatever., (*4)

The helper function t() is provided., (*5)

Then translate with tokens like so:, (*6)

<?=t("Hello, :name, how are you?", [":name" => "Bob"]); ?>

The Versions

28/04 2015

dev-laptop_things

dev-laptop_things

Support multi-lingual in YOUR application! :D

  Sources   Download

The Requires

 

The Development Requires

by Matthew Baggett