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

Logging used translation keys #712

Open
jrizmal opened this issue Mar 13, 2025 · 0 comments
Open

Logging used translation keys #712

jrizmal opened this issue Mar 13, 2025 · 0 comments

Comments

@jrizmal
Copy link

jrizmal commented Mar 13, 2025

Hi,
we would like to log which translation keys are actually used in production (for a limited time period). I was wondering how to hook into i18n to intercept all translate calls. I tried a couple of ways, like introducing a custom helper that overrides the default t method call in templates. Works okay, but I only get partial keys like .title and I would like full ones. This also doesn't work for I18n.t calls outside templates. I tried extending I18n module but couldn't make it work.

What would be the best way to get "full-key" logging working?
Thank you!

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