SharePoint Learning Kit 1.7 Localization Changes for SlkSettings.xml

22 October, 2015

SharePoint Learning Kit 1.7 Localization Changes for SlkSettings.xml

Prior to SLK 1.7, localizing the Assignment List Web Part (ALWP) was difficult in a multi-lingual environment. The query and column titles are stored in the SlkSettings.xml configuration file and can hence be translated and set to whatever you want. In fact the language packs for SLK include localized SlkSettings. However, these would be global across the site collections sharing the same configuration. So although the rest of SLK, the application pages etc, will pick up the language of the site you are on, the ALWP just picks up the string from SlkSettings file which would be just whatever language it is written in. You can change it by naming the query set to use in the ALWP properties, but you need to do that on a web part instance by web part instance basis, and you lose the functionality where it automatically chooses the query set based on your permissions on the site.  Unlike the rest of the localization, it was not transparent and doesn’t just work as you expect.

In SLK 1.7 I’ve added the ability to localize the SlkSettings.xml file. It’s certainly not perfect, and can do with more work on it, but it’s a decent start. Now you can add placeholders for strings and at run-time SLK will replace them with locale appropriate strings which are in the resource files. As an example here is the old version of a query:

















And now the new version

















You can see that the values attributes Title, NullDisplayString and ToolTipFormat have been replaced by strings of the format


You may recognise this as a standard resource string usage from SharePoint features and pages. It does work like that, but also has an extension that if the source is SlkDll, is then the  resource string QueryColumnTitleScore from the standard SLK resource file. As it’s loading the string from a resource file, then the standard localization process will take place. If you don’t want to use a resource, or to use a different string, you can just replace it with a text string as before e.g.


What this means is that you can have a common SlkSettings file across all your languages, and the ALWP will be translated automatically as long as the language pack you are using has the resource strings in. Currently I’ve only updated 2 of them, English and Welsh, so we will need some language maintainers to add them to the other languages.

Richard Willis

Written by

Copyright © 2024 SalamanderSoft Limited