Adding a new language file to Jomres

Adding a new language file to Jomres is now much easier because Jomres 10.1 onwards supports language file plugins.

See this repository on Github.


Adding new languages to Jomres isn't a difficult task, however it does require certain steps to be completed.

You need to ensure that whatever long language code you create (e.g. kl-QS (Klingon, Qo'nos) then you must remain consistent throughout. Jomres will respond to whatever language is handed to it by the host CMS, so if your host CMS passes kl-QS, then the language file(s) must all be called kl-QS.php

To begin with, you need to edit the Jomres languages class file in a number of different places.

You will need to edit the define_langfile_to_languages_array in jomres_language.class.php method to include the new language.

Next, modify the get_shortcodes() method and add the shortcode to associate it with the long code.

If you have a language file for the jquery ui date picker you will also need to modify the date picker class define_langfile_to_datepicker_files_array()

Remember, if you are modifying core Jomres scripts, then there are strategies you can employ to ensure that your class files remain safe from being overwritten by an update.

Next you will need to add a series of new language files, ideally by copying and translating one of the existing language files

Each plugin that has it's own language definitions has language files in /core-plugins/PLUGIN_NAME/language. You would also need to duplicate one of the language files and translate it for each plugin.

At the time of writing this article all Jomres Core language files, and all plugins have had their language files translated. In total there are approximately 150 language files for each language, however because of how the system works you can put ALL of the definitions, from those 150 files into one file, if it suits your requirements.

In the future I will add functionality to allow you to install languages as a plugin when I have a round tuit, if there's enough demand. At this time we are no longer accepting new languages to be included with the Core.