Hooks reference: action_view_autolang

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

Args details

  • $oPage (Instance of class AnwPage) : Current page
  • $sWantedLang (String) : Wanted language passed in ?autolang= argument

Exceptions

  • AnwPluginInterruptionException : Stay on current page, don't redirect even if it has a translation in the wanted language.

Example

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