XMLForm with Language Files

This example is intended to demonstrate the language capabilities of XMLForm.  It builds on the XML Only Example XMLForm by introducing a language file into the exact same form.  Because I considered language files to be "supporting files", I implemented the file system structure suggested in XMLForm Basic File System Setup.  I'll recap the prescribed file system structure for this example.

File System Structure

As described in the File System Setup article, a form which has supporting files SHOULD be placed in its own folder to keep it self contained.  We'll call this form "basic_language", and here is the structure I created for it:

  • JPATH_ROOT
    • /basic_language
      • /basic_language.xml
      • /language
        • /en-GB
          • /basic_language.ini

As with the XML Only example, we are relying on the HTML <table> output in order to keep the example as simple as possible.  Output templates are covered in other examples.

Common Base Name

You'll notice that the files share a common base name.  This is detailed in the File System Setup article.  If your XML file is named basic_language.xml, then "basic_language" is the base name, and your template and language files MUST share that base name.

Standard Joomla Language Folder Structure

Seasoned Joomla developers may notice that the language folder structure follows the Joomla language folder structure pattern.  This is, of course, intentional.  Using this existing structure allows me to use the Joomla translation components as intended.  It keeps the plugin simple and provides a standardized and well documented structure to follow when building XMLForms.

Field Setup

The ONLY difference in setting up this field vs the field in the XML Only example is the Use Language switch - simply, turn it on.  Joomla and XMLForm handles the rest.

 

 

Why is this software free?

I’m ditching the freemium game and giving this software to the Joomla crowd for free. It’s a nod to “Jumla”—Swahili for “all together”—because fragmentation sucks, and I’d rather focus on innovation and paid gigs. Use it, build with it, and if you need custom work, I’m super into that.

What's The Catch?

There isn’t one! I’m all about building tools that empower the Joomla community and spark creativity. This software’s free because I’d rather see it in your hands - fueling awesome projects. If you really feel like paying something, I’d appreciate a review in the Joomla Extension Directory—your feedback means a lot!