Skip to content

Expose the file loader #51

@jonasraoni

Description

@jonasraoni

Hi! Thanks for the library, it has been pretty useful.

I just have one question... Would it be possible to "expose" the json file loader? I'd like to overwrite it and return my custom object.

Use case: I wrote a translation driver to make better use of the opcache, but I can't do the same for the json files.


Other issues that I had:

  1. The default translation driver doesn't work for me: I tried to load data from different locales, but it was just returning data in en_US (I didn't inspect much as I can't use the gettext extension anyway).
  2. SymfonyTranslationDriver: as I consume different data, it keeps growing in memory, it would be nice to have a setting to discard it.
  3. SymfonyTranslationDriver: when I try to load inexistent translations, it throws an InvalidArgumentException (so I had to fallback to the DummyDriver), that's ok! But the default driver doesn't throw, so it would be good to have the same behavior and maybe a setting to retrieve a default value (en_US).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions