Manual:Hooks/LoadAllMessages

For one area of usage of this hook see Writing a new special page.