added php hooks for determining user language