0
votes

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).

How do I get the culture of the current user?

1

1 Answers

1
votes

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.