Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In ASP.NET, WinForms and others, resource management is pretty well thought of and documented. When I have xxx.hu.resx (a neutral culture) and the current culture is hu-HU (a specific culture), the fallback process will find xxx.hu.resx instead of xxx.hu-HU.resx.

In Sharepoint, there are so called provisioning resources in the Resources folder, pretty distinct from ASP.NET global resources. They are used by Sharepoint interally when displaying feature titles etc., and by SPUtility.GetLocalizedString. I failed to find specific documentation regarding my questions.

I have a hu-HU Sharepoint site collection and I deployed a dummy feature with a neutral (Resources.hu.resx) and an invariant culture (Resources.resx). Sharepoint simply wouldn't display the neutral resource, only the invariant one. When I added a specific culture (Resources.hu-HU.resx), it is displayed just fine. Looks like the specific-neutral fallback process is missing.

I also tried applying a NeutralResourcesLanguageAttribute to the solution assembly, tried every combination of the neutral culture, the fallback location and site collection language, and it simply didn't change a thing. Looks like this attribute is not supported at all.

Sadly I have no idea to find out by disassembly how it works because SPUtility.GetLocalizedString calls an unmanaged method.

Did I do something wrong, or did Sharepoint badly reinvent resource management and doesn't support the above stuff?

share|improve this question
    
sorry but I read your question atleast 10 times, but am still confused whats the real problem –  tereško Aug 29 '12 at 11:24

1 Answer 1

up vote 0 down vote accepted
+50

It's not well documented but SPUtility.GetLocalizedString don't support Language-neutral resources. See SharePoint SPUtility.GetLocalizedString() Behavior from Cliff Green's MSDN blog which describes SharePoints very different fallback behavior.

I don't know if SharePoint reinvented or invented the resource management, but as you can see it's using its own implementation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.