Let me try to explain in layman's terms how Joomla's \Joomla\CMS\Language\Language::load()
and its use from Joomla's works.
Let's say that you want to load the Italian (it-IT) language strings for com_ats
(Akeeba Ticket System), for the JPATH_BASE
(the frontend of the site).
Joomla will first always load the en-GB files, then the it-IT files. This is deliberate: it gives a human-readable fallback in case you have not yet translated something in Italian e.g. if we added a new language string in the meantime.
Joomla looks for the following files, in this order:
- language/it-IT/com_ats.ini
- language/it-IT/it-IT.com_ats.ini
- components/com_ats/it-IT/com_ats.ini
- components/com_ats/it-IT/it-IT.com_ats.ini
The first one found makes the language loading process stop immediately. The other files won't be loaded.
This means that you need a total of three files for the Italian translation of ATS:
- language/it-IT/com_ats.ini (copied from language/en-GB/com_ats.ini). This is the frontend language file.
- administrator/language/it-IT/com_ats.ini (copied from administrator/language/en-GB/com_ats.ini). This is the backend language file.
- administrator/language/it-IT/com_ats.sys.ini (copied from administrator/language/en-GB/com_ats.sys.ini). This is the system language file, used to display some administrator menu items, the name of the component in the Extensions, Manage page, and some component Options.
I hope this helps!
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!