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
- function hook_action_view_autolang($oPage, $sWantedLang) {
- //your code here...
- if (/* special case *//*) throw new AnwPluginInterruptionException(); }
- en
Last edited on 04/05/2009 14:23:12