Jump to content

Can LanguageSupport installation be automated?


gornycreative
 Share

Recommended Posts

I was trying to automate using

$rm->installModule("LanguageSupport");

But I found that when I ran the migrate script some processes installed while others did not and got errors tied to not being able to rename page #0, etc. I tried playing around with manually prempting process installs but then I'd get errors around templates or fields already existing.

I can manually install LanguageSupport and of course go through all the follow-ups that I need. I just am wondering if there is an order/trick to getting it to work.

  • Like 1
Link to comment
Share on other sites

  • gornycreative changed the title to Can LanguageSupport installation be automated?

This is the rm-defaults snippet which I always use and works for me:

<?php
$rm->setPagenameReplacements('de');
$rm->setModuleConfig('AdminThemeUikit', [
  // use consistent inputfield clicks
  // see https://github.com/processwire/processwire/pull/169
  'toggleBehavior' => 1,
]);
$rm->setModuleConfig('ProcessPageList', [
	'useTrash' => true, // show trash in tree for non superusers
]);
// install german language pack for the default language
// this will install language support, download the ZIP and install it
$rm->setLanguageTranslations('DE');
$rm->installModule('LanguageSupportFields');
$rm->installModule('LanguageSupportPageNames');
$rm->installModule('LanguageTabs');
$rm->setFieldData('title', ['type' => 'textLanguage']);

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...