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.

  • 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. – mickmackusa Jun 27 '19 at 19:52
  • 1
    Added some additional notes about the steps I've taken so far. – John Rix Jun 27 '19 at 21:41
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
| improve this answer | |
  • Please award your resolving answer with the green tick. – mickmackusa Feb 8 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.

| improve this answer | |
  • 1
    Alex, good to know, thanks! – John Rix Feb 7 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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