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

[Question] How do you deploy translations? #158

Open
iwasherefirst2 opened this issue Jul 26, 2020 · 1 comment
Open

[Question] How do you deploy translations? #158

iwasherefirst2 opened this issue Jul 26, 2020 · 1 comment

Comments

@iwasherefirst2
Copy link

iwasherefirst2 commented Jul 26, 2020

Hi, thanks for this awesome translation-manager.

How is it thought to use this translation-manager in production? Is there any idea how it can be used by developers and non-developer site users?

When a developer adds a key, he usually changes the key:value pair in resoures/lang/en/some_group.php so far. In my scenario, the language groups are tracked by git, so they get deployed. However, with this setup, if people make changes in my-domain.org/tranlsations in production the changes won't take effect, because they are only stored in the database. I was thinking of calling translation:export on deploy to overwrite the language files with the info from the database. However, this would have the downside that the developer needs to add his new keys on production at my-domain.org/tranlsations.

Am I missing anything? Or is this package not recommended to be use in production?

We are thin

@vesper8
Copy link
Contributor

vesper8 commented Nov 18, 2020

There are many ways you can use this

As a developer doing all the translations, then you do them on your dev environment, export and then commit/deploy the updated translation files

If you want translations to be manageable in real-time, on production, then it gets more complicated and you could potentially end up with bad translations being released live. But you would basically allow translations to be managed on your production environment, and then you would use one of the events to trigger the export process. Or you could schedule a job every X minute and check if there are any new modifications to the translations by checking the created_at/updated_at fields and tracking when was the last time you ran an export.. or simply run an export every minute if you want since it's a low cost operation

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

2 participants