GithubHelp home page GithubHelp logo

phptalview's People

Contributors

niterain avatar peeto avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

phptalview's Issues

Enhancement request: i18n

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!

Error during the installation

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)

Laravel 5 compatibility

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.