Homepage

TranslationKeyExists

Last edit: Apr 01, 2026

TranslationKeyExists

Severity: error | Type: LiquidHtml

This check ensures that translation keys referenced with the t (or translate) filter are defined in the default language translation files. It helps prevent missing translation errors at runtime.

Examples

✗ Incorrect Code Example (Avoid using this):


{{ 'undefined.key' | t }}
{{ 'nav.missing_label' | translate }}

The keys undefined.key and nav.missing_label do not exist in the default translation files.

✓ Correct Code Example (Use this instead):


{{ 'nav.home' | t }}
{{ 'nav.about' | t }}

Where nav.home and nav.about are defined in your default language file (e.g. app/translations/en/nav.yml).

Configuration

The default configuration for this check:

TranslationKeyExists:
  enabled: true
  severity: error

Disabling This Check

There should be no need to disable this check. For translation keys managed via the platformOS Admin UI (not stored in the codebase), use the appropriate configuration option in app/config.yml.

Resources

Questions?

We are always happy to help with any questions you may have.

contact us