Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write default php translations to json #57

Open
Duncan-hrn opened this issue Aug 4, 2023 · 0 comments
Open

Write default php translations to json #57

Duncan-hrn opened this issue Aug 4, 2023 · 0 comments

Comments

@Duncan-hrn
Copy link

I am not sure if this is something others would want to make use of:

Scenario:
To simplify the translation task I want to be able to send a single file to my translator in json format.

  • I have strings throughout the code - these are successfully scanned and added to lang/xx.json (xx is the short code for the target language)
  • I have strings in lang/en/auth.php, lang/en/validation.php etc. - these get exported for translation to lang/xx/auth.php, lang/xx/validation.php etc. - I would like these added to lang/xx.json

Current solution:
I can see from the source code that by overriding the binding of localizator.writers.default in my AppServiceProvider I am able to achieve this

        $this->app->bind('localizator.writers.default', JsonWriter::class);

I have put the above solution in place, but it would be nice to have this as an option in the configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant