You can effectively export the translations into a JSON file and use an internationalization package like this one.
Optimizing Inertia.js Localization: DB-based translations vs. Static File Generation
Hi,
I am working on a project with dynamic language support where translation strings are stored in the database. Currently, these translations are passed via Inertia props on every request, which causes significant bloat in the data-page object (payload).
I want to eliminate this overhead. My proposed solution is to export the database translations into a static file (e.g., JSON) and regenerate this file whenever a translation is updated in the database.
How would you evaluate this approach in terms of performance and best practices? Is this a recommended pattern for avoiding payload bloat in Inertia?
Please or to participate in this conversation.