Hooks reference: action_view_autolang_go

This hook is called by Action:view when a page is called with ?autolang= argument, and the page is available in the wanted language.

Args details

  • $oPage (Instance of class AnwPage) : Current page
  • $oGoodPage (Instance of class AnwPage) : Translation of current page in the wanted language passed in ?autolang= argument

Exceptions

  • AnwPluginInterruptionException : Stay on current page, don't redirect to the wanted language's translation.

Example

  1. function hook_action_view_autolang_go($oPage, $oGoodPage)
  2. {
  3. //your code here...
  4. if (/* special case *//*) throw new AnwPluginInterruptionException();
  5. }
  • en
Last edited on 04/05/2009 14:23:21
Powered by Anwiki • 0.03 sec • 2.03 MB