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

How to handle when a term doesn't exists? #67

Open
ppazos opened this issue Dec 27, 2019 · 1 comment
Open

How to handle when a term doesn't exists? #67

ppazos opened this issue Dec 27, 2019 · 1 comment

Comments

@ppazos
Copy link

ppazos commented Dec 27, 2019

When a term doesn't exists I'm getting an exception "Fatal error: Uncaught Error: Undefined class constant".

It happens when two lang files exist but one has missing translations.

@Philipp15b
Copy link
Owner

Yes, if the translation string is not available in a language file then the class does not contain the corresponding string. This is intended behaviour.

You could check if a term is defined in the current language using something like PHP's defined.
Hope that helps.

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

2 participants