Change theme/language based on user preferences

Hey there,

Can somebody tell me where I should place the code to change the theme and language based on the language/theme field in the user table, for the current logged in user?

I was thinking about a preFilter(), but it’s not like I’m filtering something. It’s just going about some code which should be executed before the action stuff (beforeAction wouldn’t be an option in this case, because I have some filters which display some views who needs the right language and theme configuration).

I hope someone can help me :)


Maybe you’re after CApplication::onBeginRequest.