Jump to content

How to hook after import translation files inside modules [SOLVED]


Juergen
 Share

Recommended Posts

Hello,

as introduced in PW 3.0.181 modules can be shipped with translation files. I am trying to hook after the save method of this new functionality, but I could not get it to work.

This hook is inside a module:

  // initialize the hooks
  public function init() {    
      $this->addHookAfter('ProcessLanguage::save', $this, 'testHook');
  }

protected function testHook(HookEvent $event)
  {
    wire('session')->message('test');
  }

Nothing happens!

Does anyone has an idea how to hook this new functionality. I have also tried it with fe ProcessLanguage::executeDownload but without success.

Here is the Github page of the new feature:

https://github.com/processwire/processwire/blob/master/wire/modules/LanguageSupport/ProcessLanguage.module

 

Link to comment
Share on other sites

  • Juergen changed the title to How to hook after import translation files inside modules [SOLVED]

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...