You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project using Next.js with next-intl for internationalization and Strapi as our CMS that exposes an API handling translation keys and their translations in different languages. I would like to know if there's a way to automatically handle missing translation keys by creating them on-the-fly in Strapi rather than throwing errors or displaying placeholder text.
Tech Stack & Setup
Next.js app with next-intl for internationalization
Strapi CMS for content management
Strapi exposes API endpoints for managing translation keys and their values across languages
Use Case
During development, our content and features evolve quickly, and we frequently add new UI elements that require translations. Instead of manually adding each new key to all language files and then to Strapi before using them, it would be more efficient if:
When a key is missing in the current locale, next-intl could automatically create it in Strapi via the API
The system could use a default value (maybe the key itself or content from the default language) until translations are provided
Optionally, flag these auto-created keys in Strapi so they can be easily identified for proper translation later
Questions
Is there an existing feature or configuration option in next-intl that supports this workflow with a CMS like Strapi?
What would be the recommended approach to intercept missing keys and create them in Strapi via its API?
Are there any performance considerations to keep in mind when implementing this kind of on-the-fly key creation?
Any examples or suggestions for implementing this with the next-intl and Strapi integration would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm working on a project using Next.js with next-intl for internationalization and Strapi as our CMS that exposes an API handling translation keys and their translations in different languages. I would like to know if there's a way to automatically handle missing translation keys by creating them on-the-fly in Strapi rather than throwing errors or displaying placeholder text.
Tech Stack & Setup
Use Case
During development, our content and features evolve quickly, and we frequently add new UI elements that require translations. Instead of manually adding each new key to all language files and then to Strapi before using them, it would be more efficient if:
When a key is missing in the current locale, next-intl could automatically create it in Strapi via the API
The system could use a default value (maybe the key itself or content from the default language) until translations are provided
Optionally, flag these auto-created keys in Strapi so they can be easily identified for proper translation later
Questions
Is there an existing feature or configuration option in next-intl that supports this workflow with a CMS like Strapi?
What would be the recommended approach to intercept missing keys and create them in Strapi via its API?
Are there any performance considerations to keep in mind when implementing this kind of on-the-fly key creation?
Any examples or suggestions for implementing this with the next-intl and Strapi integration would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions