My code is very similar to yours, I have a class that inherits system.web.ui.page and inside there I have protected overrides sub initializeculture(). Therein I determine the language via a token that is decrypted on page init. The reason I did this on init is that, as I understand it, init only happens 1 time in the page life cycle so less of a hit for page refreshes and what not, and I have page-specific things that may or maynot run on page_load per page.
My code is at work atm (otherwise I'd just paste it) but it has no problem with me using en-ca as the uiculture and culture; however when the page loads the resource file for canadian english, it claims it can't find the first resource (the word "home") - yet it is in every single resx file I have including a culture neutral one. So my problem appears to be that I have set a culture and improperly named my file for locating the resource, or my file itself is somehow incorrect (the resource file that is).
Thanks again for your feedback. I'll paste my code first thing tomorrow.
edit: As fate would have it, I needed to patch something up at work, so I remoted in: Here's a snippet:
Public Class BasePage
Protected Overrides Sub InitializeCulture()
Select Case Session("language")
Me.MasterPageFile = "Master-EN.master"
Me.Culture = "en-us"
Me.UICulture = "en-us"
Me.MasterPageFile = "Master-FR.master"
Me.Culture = "fr-ca"
Me.UICulture = "fr-ca"
Me.MasterPageFile = "Master-CE.master"
Me.Culture = "en-ca"
Me.UICulture = "en-ca"
Me.MasterPageFile = "Master-ES.master"
Me.Culture = "es-us"
Me.UICulture = "es-us"
Yes this could be written more elegantly, but for now I don't have control over how the information is passed to me, so I can't rely on the language selection to be properly formatted at this time to simply be passed into the culture and uiculture.
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | Asus 970GTX | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W | Asus ROG Swift Gsync 27"