Skip to main content

Language String Auto-Indexing

Automatically track, index, and manage all language strings used throughout your component โ€” without manual intervention.

What Is Language String Auto-Indexing?

Language String Auto-Indexing refers to JCBโ€™s ability to:

  • Scan templates, layouts, views, fields, and snippets for language constants (e.g., COM_MYCOMPONENT_SOMETHING)
  • Detect usage and ensure entries exist in the relevant .ini language files
  • Maintain consistency between your componentโ€™s UI and multilingual support
  • Minimize missing language string errors on frontend or backend

This indexing is done at compile-time, ensuring performance and eliminating the need for manual tracking of every constant.

How It Works in JCB

During compilation, JCB:

  • Parses all fields, views, layouts, templates, and snippets.
  • Searches for constants wrapped in JText::_(), JText::script(), or other Joomla translation calls.
  • If a key is missing in the .ini files, it is:
    • Added to the relevant language file (e.g., en-GB.com_example.ini)
    • Given a default value (can be customized later)
  • The language strings are grouped by source (field, view, template, etc.) to improve traceability.

Optionally, JCB supports export/import of all language strings via Excel for bulk management.

Benefits

  • ๐Ÿšซ No Missing Language Keys
    Prevents blank text or errors caused by untranslated constants.
  • ๐Ÿ”„ Auto-Syncs Across Versions
    Keeps your multilingual .ini files up-to-date on every compile.
  • ๐Ÿ” Centralized String Management
    Easily find where a language string is used โ€” improves maintenance and translation workflows.
  • ๐Ÿ“ˆ Works With Per-Field Control
    Complements per-field language settings for granular multilingual UI development.
  • ๐Ÿ’ผ Excel Workflow Support
    Export/import your entire language map as a spreadsheet โ€” great for translators.

Use Cases

  • Building multilingual Joomla components that evolve over time
  • Automating translation workflows without extra tools
  • Ensuring string consistency across reused fields, templates, and views
  • Avoiding hardcoded values in templates or layouts

Best Practices

  • Use language constants for all UI text (not hardcoded strings)
  • Regularly export strings for translation and review
  • Customize auto-generated default values after first compile
  • Review logs to catch any unused or deprecated strings

Summary

JCBโ€™s Language String Auto-Indexing feature scans your entire component during compilation to detect any language strings (JText constants) in use. It automatically collects, registers, and maintains them in the appropriate language files, ensuring your multilingual content stays synchronized and accurate across every build.