thru.io / translation
There is no license information available for the latest version (0.2) of this package.
Support multi-lingual in YOUR application! :D
0.2
2016-01-28 10:17 UTC
Requires
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- fzaninotto/faker: 1.5.*@dev
- squizlabs/php_codesniffer: *
- thru.io/active_record_migrations: dev-master
This package is auto-updated.
Last update: 2024-11-24 07:50:14 UTC
README
Support multi-lingual in YOUR application! :D
Install like so:
composer require "thru.io/translation": "dev-master"
Setup like so:
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.
The helper function t()
is provided.
Then translate with tokens like so:
<?=t("Hello, :name, how are you?", [":name" => "Bob"]); ?>