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

Has anyone created a custom resource provider for SharePoint, maybe using sp lists to store translations, similarto this post: DbResourceProvider ? The idea is to be able to replace compiled resources in dlls at runtime. I'm using the strongly typed resources to get them in code.

string Today = Resources.resources.Today;

More links about custom resource provider here: www.west-wind.com.

Something close to what I need is here: Multilingual menus - MOSS

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Although it's not quite what you're looking for, I created the 'SharePoint Language Store' (perhaps not the best name!) on Codeplex as a result of a project I worked on which had 100 SharePoint sites in around 30 languages. We also liked the idea of using a SharePoint list for such values, as the client could add translations over time and it sat well with other aspects of SharePoint. Similar to .Net, a 'fallback' process is used to determine which language to retrieve from the list e.g. if 'FR-CH' is requested but we have no value, check 'FR', before finally falling back to the default language. Caching is implemented for performance, and there's a .Net expression builder for retrieving values in markup i.e:

<asp:Button runat="server" id="btnSearch" Text="<%$ SPLang:Search|SearchGoButtonText %>" />

Fellow MVP Waldek Mastykarz built some T4 templates around my solution to provide strongly-typed access e.g:

string body = LanguageStoreValues.InitiationWorkflow.Message_EmailBody_AddContentAndOwnersTask;

Not sure if he ever published them publically, but from past conversations I know he's happy to share.

So that all might get you kinda close to what you're looking for?

Some more info in my Building multi-lingual SharePoint sites - introducing the Language Store post, and the Codeplex project is at http://splanguagestore.codeplex.com/

P.S. The Language Store is a sister project to the more popular Config Store for configuration values.

share|improve this answer
    
Hello Chris, I noticed SharePoint 2010 has it's own 'Resources' database table in which multilanguage resource string for sites and lists are stored. Is there no way of plugging into this and using that table? I don't need my users to manage their own resource strings and want to stick to what comes out of the box. The weird thing is that I can't find any documentation about this, as if MS hid the classes / resource provider so we can't use them. I wonder why. But perhaps I'm looking in the wrong spot. –  Jasper Jul 1 '11 at 12:20

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.