1

Does anybody know of a way to automate the installation of language packs via the CLI, as opposed to using the Extensions -> Language(s) menu in the administrator CMS?

I am automating a site build script at present, but this is one of the gaps I have yet to fill.

I have Googled for options, checked SO and this forum and not found any results. I have checked the cli folder in the Joomla installation and found no supporting scripts for the purpose.

I presently use a third party tool found here for installing other extensions, but the method for installing language packs via the CMS is different to other extensions and without digging into the guts of the Joomla code, I don't know if/where I can download a zip file of the language packs that I can use with the above mentioned tool. I'll do that if needs be, but I felt it worth asking the question here in case anybody else has already solved this.

2
  • I assume that you have done research and attempted something before posting your question. Please edit your question to include the online documents that you have already seen and show us yoir best (failed) attempt(s). This will make your question easier / more attractive to answer. Commented Jun 27, 2019 at 19:52
  • 1
    Added some additional notes about the steps I've taken so far.
    – John Rix
    Commented Jun 27, 2019 at 21:41

2 Answers 2

2

For anybody else running into this, I ended up solving it using the installation script linked to in my question, after correctly locating the latest language file version as follows:

LANGUAGE=ga-IE
cd $JPATH_ROOT
PACKAGE_URL=`curl -s https://update.joomla.org/language/details3/${LANGUAGE}_details.xml | grep downloadurl | tail -1 | sed -r 's/.*>(.*)<.*/\1/'`
wget -O /tmp/$LANGUAGE.zip $PACKAGE_URL
php ./install-joomla-extension.php --package=/tmp/$LANGUAGE.zip
1
  • Please award your resolving answer with the green tick. Commented Feb 8, 2020 at 2:11
1

I have not enough reputation to add a comment, so I need to post a new answer.

The solution of "John Rix" works perfect but I like add one thing: You have to make sure you sort the data from the xml file by version number. It is not sufficient to use the last occurrence of downloadurl because the list seams to be unsorted.

Example: https://update.joomla.org/language/details3/de-DE_details.xml 3.9.15.1 is positioned prior to 3.9.9.1 which is currently the last entry in the xml.

1
  • 1
    Alex, good to know, thanks!
    – John Rix
    Commented Feb 7, 2020 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.