You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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).
SymfonyTranslationDriver: as I consume different data, it keeps growing in memory, it would be nice to have a setting to discard it.
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).
The text was updated successfully, but these errors were encountered:
Would it be possible to "expose" the json file loader?
May you explain what do you want to do with this json loader?
There is maybe a reason to convert original debian's json files to php files on release to use opcache, so no loader will be required.
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).
Gettext driver trust you system locale is valid. If you use some framework with localization, it may not change system locale, just it's internal configuration. But gettext requires valid locale, so you may use \Sokil\IsoCodes\TranslationDriver\TranslationDriverInterface::setLocale manually.
SymfonyTranslationDriver: as I consume different data, it keeps growing in memory, it would be nice to have a setting to discard it.
All drivers configured manually when created \Sokil\IsoCodes\IsoCodesFactory, If you do not configure it, it will not load.
SymfonyTranslationDriver: when I try to load inexistent translations, it throws an InvalidArgumentException
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 thejson
files.Other issues that I had:
en_US
(I didn't inspect much as I can't use thegettext
extension anyway).InvalidArgumentException
(so I had to fallback to theDummyDriver
), 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
).The text was updated successfully, but these errors were encountered: