niterain / phptalview Goto Github PK
View Code? Open in Web Editor NEWThis package adds PHPTAL to Laravel
License: MIT License
This package adds PHPTAL to Laravel
License: MIT License
Hi, I'd love to see GetText support for PhpTalEngine.
I made a simple implementation for this but am hesitant to issue a pull request because I'm new to Laravel4 and not sure about the config stuff.
/**
* Enable GetText Translation
*
* @param mixed $languages language (string) or array of several languages
* @param string $domain GetText domain to use (basename for .mo+.po files)
* @param string $translation_root path where locales are located
*/
public function activateGetText($languages = null, $domain = "translations", $translation_root = null)
{
if($languages === null)
$languages = [\Config::get('app.locale')];
if(!is_array($languages))
$languages = [$languages];
if($translation_root === null)
$translation_root = base_path() . "/locale/";
$tr = new \PHPTAL_GetTextTranslator();
call_user_func_array([$tr, "setLanguage"], $languages);
$tr->addDomain($domain, $translation_root);
$tr->useDomain($domain);
$this->phptal->setTranslator($tr);
}
Could you maybe bake this properly into PhpTalView or inform me about needed changes for a possible pull request? Cheers!
When i try to install this package, i get this error:
Your requirements could not be resolved to an installable set of packages.
I require only this package:
"require": {
"laravel/framework": "4.2.*",
"niterain/php-tal-view": "*"
},
(I'm sorry if my English is not so good)
PhpTalView currently cannot be used with Laravel 5, which would be very nice.
Problem 1
- Installation request for niterain/php-tal-view dev-master -> satisfiable by niterain/php-tal-view[dev-master].
- niterain/php-tal-view dev-master requires laravel/framework ~4.2.11 -> no matching package found.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.