I implement localization in my WCF application according to http://www.codeproject.com/KB/WCF/WSI18N.aspxand some other articles. Basically, I attach the message header with the current culture information on the client (using the IClientMessageInspector implementation), and then apply the culture information in the current thread on the server side (using the ICallContextInitializer implementation). The problem I'm currently facing is that my implementation of ICallContextInitializer is probably not the best place to actually change Thread.CurrentThread.CurrentCulture according to the message header, since thread culture in AfterInvoke () is reset before others things that still need to be in a localized context. I currently have a problem with implementing IErrorHandler - it is called after ICallContextInitializer.AfterInvoke (),so the thread has already reset back to the default culture and therefore I cannot work with localized resources in my IErrorHandler.
Is there a better extension place than ICallContextInitializer, which I could use to localize based on the message header? Or better - is there an article describing the execution sequence in WCF? I would like to understand the sequence in which different extension points are processed ...
The problem is resolved, but I would like more information about the internal sequence of WCF execution, etc. - all tips for reading on this topic?
source
share