WebUtilsTrySetThreadCultureByRequestedUserLanguage Method |
Attempts to set the web worker thread culture to match the language requested by the Accept-Language HTTP header.
If no specific language is requested or setting the requested language fails, the thread culture is set to the invariant culture.
Namespace:
PDTec.IceNet.Web.Utils
Assembly:
PDTec.IceNet.Web (in PDTec.IceNet.Web.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax public static bool TrySetThreadCultureByRequestedUserLanguage(
HttpRequest request
)
Parameters
- request
- Type: System.WebHttpRequest
The current HttpRequest instance.
Return Value
Type:
Booleantrue if a specific language has been requested and was successfully set, otherwise
false.
Remarks Typically this method is used in the Global.asax Application_BeginRequest event.
See Also