Code Monkey home page Code Monkey logo

Comments (4)

justin-cook avatar justin-cook commented on June 5, 2024

Not sure if it breaks anything but this is how I was able to get it working. Changed Breadcrumb.php's setConfiguration() to:

public function setConfiguration($config) {
    // Load Util Classes / backwards compatibility
    if(is_string($config)) {
        $this->config = new Config (array( 'language' => $config ) );
        $this->translator = new Translator($this->config);
    } else if (is_array($config)) {
        $this->translator = new Translator($config);
    } else {
        throw new InvalidArgumentException("Please provide a string or an array as parameter!");
    }

    return $this;
}

Then in Translator.php changed this in __construct():

if (is_array($config) && array_key_exists('language', $config)) {
    $this->dictionary = $this->loadDictionary($config['language']);
} elseif(is_array($config)) {
    $this->dictionary = $config; //$this->loadDictionary($config);
} else {
    // fallback
    $this->dictionary = $this->loadDictionary($this->config->value('language'));
}

from breadcrumb.

noherczeg avatar noherczeg commented on June 5, 2024

I'll look into it tomorrow, sorry for the delay.

from breadcrumb.

noherczeg avatar noherczeg commented on June 5, 2024

Hey, sorry again for the delay, but I finally managed to put out a fixed version (bd69568). Your solution produced a failing test, so I modified it and wrote a test for it as well. Now it passes, but I'm not 100% sure that this solved the problem for everyone.

If you'd have some time I'd welcome your feedback on the latest version! :)

from breadcrumb.

justin-cook avatar justin-cook commented on June 5, 2024

Works for me.

from breadcrumb.

Related Issues (14)

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.