Closed subotkevic closed 4 years ago
Hi @subotkevic,
yes I need to support the new JSON lang format. But I don't know yet how to do this. I think I will change the current behaviour. When a lemma is not prefixed by a family, it throws an error. Now it will put this lemma in the JSON file instead.
But the problem is how to detect supported langs. Now I take a look on the sub-folders in the lang
folder. Given that this structure is not mandatory now, I think I will let user define target langs in the configuration file for json lemma.
Is it sound correct for your use ?
looking forward to this! when do you think the beta will be available?
Absolutely no idea! I need to rewrite a big part of the extension to manage several types of langage files.
Perhaps in several weeks...
Or we could create new package for that. Because we need to:
Scan all the files and get all the __('Strings')
and put them in-to lang files langs/{locale}.json
to allow developers translate them without putting each string in-to the file.
I prefer to keep it the same package, 99% of the code is in common. I just need time to develop this! Next week is busy, both next are French holidays and I am with my children so dev will begin before April 18th.
Great work! Is there an ETA for JSON support?
Any news on this?
No ETA, never finished and I don’t work with PHP for the moment.
I think I'll take care of this feature by creating new package for that specifically.
Hi. Any update on this? It would be great to have a command parameter --tojson
to output json instead of php.
Or, it may be easier to generate PHP (like actually), then read it (load it with PHP as an array), convert and save to a Json from here?
@subotkevic did you work on
Thanks.
EDIT: oh, I see https://github.com/subotkevic/laravel-json-translation-helper - is it production-ready?
@mtx-z I’m personally using it on few projects in production.
Hi,
I'm just wondering will this package support Laravel's JSON translation system?
Thanks.