Skip to main content

Reverse String Parser

Automatically convert language constants back into readable text โ€” for easier edits, localization, and readability.

What Is the Reverse String Parser?

In Joomla Component Builder (JCB), the Reverse String Parser is a feature that scans compiled files and replaces language constants (e.g. COM_EXAMPLE_FIELD_TITLE) with their original natural-language text (e.g. โ€œTitleโ€) โ€” directly within the GUI or editing interface.

This makes editing, reviewing, and debugging easier, especially when importing compiled code or rebuilding components not originally created in JCB. Itโ€™s particularly useful when working with imported admin/site views, custom layouts, or previously compiled strings.

It can also help synchronize custom strings with your field definitions, reducing duplicate or broken language keys.

Key Features

  • ๐Ÿง  Automatic Constant-to-Text Conversion: JCB detects Joomla language constants and reverses them into natural text based on matching .ini entries.
  • ๐Ÿ“ฅ Import-Friendly Parsing: Use when importing compiled components, templates, or external Joomla code โ€” helps rehydrate natural labels into JCB's field or layout configuration.
  • ๐Ÿ“˜ Supports INI and JSON Language Files: Works across standard Joomla .ini language files or those embedded inside JCB views, fields, or templates.
  • ๐Ÿงพ Inline Parsing for Admin/Site Views: During layout import or analysis, the parser reverts COM_MYCOMPONENT_LABEL to readable labels in the layout builder or snippet.
  • ๐Ÿ”„ Bidirectional Language Awareness: Tightly integrated with JCBโ€™s language compiler, so string reversals remain in sync with forward-generated language constants.
  • ๐Ÿ›  Available During Compile or Edit: Use manually before or after compilation โ€” particularly during blueprint import or template update scenarios.
  • ๐Ÿงฌ Helpful for Legacy Cleanup: Clean up old or misaligned constants in older blueprints or externally generated templates.

Use Cases

  • Import a layout file and automatically see โ€œTitleโ€ instead of COM_MYCOMPONENT_TITLE
  • Reformat an old componentโ€™s view by converting all constants to real-world labels before editing
  • Review a fieldโ€™s output structure more easily during GUI layout mapping
  • Repair or rebuild old views by syncing language strings to the correct display text

How to Use in JCB

  1. In any area where layout/text content is loaded (e.g. Layouts, Templates, Fields, Views):
    Use the <?php echo Text::_('Text'); ?> or similar action in the layout interface
  2. JCB will scan for Joomla language constants (usually all-uppercase, underscore-separated)
  3. Each matched constant is compared against available .ini translations
  4. Matches are replaced inline with the corresponding natural-language label (if found)

๐Ÿง  Pro Tip: After parsing, you can always toggle back to constants if needed using the forward language builder.

Conclusion

The Reverse String Parser helps bridge the gap between machine-readable Joomla constants and human-friendly labels. Whether cleaning up old code, importing templates, or working with localized views, this feature gives you a clearer editing experience and faster path to multilingual-ready Joomla components.