-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Checking if translation exists #448
Labels
Comments
This mostly looks like a duplicate of #88. Note however that the message fallback can be customized, that should likely work for your use case: https://next-intl-docs.vercel.app/docs/configuration#error-handling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently when translation is not available, the return value is just the translation key, which makes checking for translation existence hard.
Describe the solution you'd like
It would be nice to have an option, which would return null when translation is not found instead of translation key.
For example:
The suggested API is not ideal, maybe someone has a more convenient idea.
Describe alternatives you've considered
The only alternative I could think of is checking if returned string matches key, which is very verbose:
The text was updated successfully, but these errors were encountered: