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

Add option to save translations to a file somewhere? #20

Open
chessandrock opened this issue Aug 13, 2024 · 0 comments
Open

Add option to save translations to a file somewhere? #20

chessandrock opened this issue Aug 13, 2024 · 0 comments

Comments

@chessandrock
Copy link

Here is my use case:

I do all my translations using Laravel to avoid duplication of work, but make use of these in a React frontend. When I post stuff to production, I store the content of window.LARAVEL_TRANSLATIONS in a file (let's say "resources/js/translations.js") and have a condition that, if I am running in prod, I load messages from the translations.js file because once my frontend is built I'm no longer relying on vite; otherwise, I'm loading window.LARAVEL_TRANSLATIONS.

Today I forgot that step, and my customer wasn't happy at all, but that's another story.

Is it possible to add this option? I could try adding such a feature (although I don't know much about TypeScript), but wanted to discuss with you all. I've searched for a solution, but came empty handed on that.

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