Joomla - Creating a component 'Smart Search' Language file
Having created a custom Finder (Smart search) plugin for our Issue Tracker component, there was one small problem left which was that the supplied language translations were not being picked up by the ‘Smart Search module’.
Having spent time ensuring that the format of the language files were correct and that they were being placed in the correct directory on installation and were named as the documentation suggested.
To cut a long story short, it seems that ‘Smart Search’ is assuming its own specific name for the ‘language files’. Usually a plugin would have a name composed of the language code (i.e. en-GB') and a full stop ‘.’. There then follows a prefix of ‘plg’, followed by an underscore ‘_’, then the plugin type. i.e. ‘system’, or ‘finder’ etc. Then we have another underscore and the name of the plugin itself, and finally the suffix ‘.ini’ or ‘.sys.ini’, depending of the specific language file usage.
So for our Issue Tracker finder plugin we would have a file named ‘en-GB.plg_finder_issuetracker.ini’.
Alas Smart search is looking for the file named ‘en-GB.Smart Search - Issue Tracker.ini’. So since our file does not match that name, it is not found and hence the strings are not translated.
We have copied the file to the expected name and the strings are picked up and work as expected.
This I assume is a Joomla bug so will be reported , and if not a bug should certainly be documented somewhere.