-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Add lang.HasTranslation
#10538
Labels
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
Currently it is not possible to know if a translation key is available in a site's language.
Many themes rely on open contributions to maintain their localization. If a a new string needs to be added or and old one edited, maintainers need to either:
2.
Will add this untranslated string to every project updating the theme.Current workaround is rather clumsy (assumes default lang is en):
Proposal
Introduce a new method on the
lang
object or thesite.Lang
object which tests the existence of atranslation
key and returns a boolean.The text was updated successfully, but these errors were encountered: