开发者

Crm 4.0 Custom Page (isv) how to get the current crm UICulture

开发者 https://www.devze.com 2022-12-26 08:33 出处:网络
I have a custom page (isv) used in a crm 4.0 solution (through IFrames) and I want it to support multiple languages. I have localized it using resx files, but the UICulture defaults to english event t

I have a custom page (isv) used in a crm 4.0 solution (through IFrames) and I want it to support multiple languages. I have localized it using resx files, but the UICulture defaults to english event though I have changed it to danish (according to System.Threading.Thread.CurrentUICulture).

H开发者_StackOverflowow do I get the culture of the current user?


If you are using a custom page under the ISV folder, they are loaded by the CRM application and compiled on demand. So every resources are not loaded by CRM and the pages under this directory are not considered applications by IIS (except if an application is created on the directory, in IIS).

So I think there is two solutions. Create an application in IIS, and in this case the application will be handled by IIS like a standard ASP.Net application. Or you can create standard ASP.NET pages, and let CRM handle them.

In both case the culture is provided by the IFrame. When you configure it in CRM, you have the option of passing parameters (Pass record object-type code and unique identifier as parameters). The parameter that you want is the UserLCID.

See http://msdn.microsoft.com/en-us/library/cc150848.aspx for more information.

0

精彩评论

暂无评论...
验证码 换一张
取 消