May
04

Language sensitive search results in SharePoint

 

The Problem:

SharePoint returns different search results when I change my browser language

Searching for "the" in English will give no results because the word is ignored. 

Search results in English

Searching for "the" in Dutch does give results.

 Search results in Dutch

This is a feature of SharePoint, it's not a bug.

However, it's not always desirable behaviour. In a multi-lingual site with a variation for each language the search results should be in the language of the current variation.

By default SharePoint will ignore the variation settings and still take the browser language.

There are several posts with the same problem, here and herehere. The suggested solutions range from changing the browser language programmatically to creating a new masterpage with the Culture hard coded, to subclassing the search results web part and changing the Culture settings in the OnInit event.

Unfortunately these solutions either do not work or require a lot of work for a simple change.

The solution:

The Search Core Results web part has a property called "SearchLanguage", which holds the locale of the search results. By default this property is null, and the locale will be inferred from the browser language

To set this property to your language of choice, export the Search Core Results web part.

Towards the end of the file you'll find the property QueryLanguage, which is null by default:

<property name="QueryLanguage" type="string" null="true" />
 

Change this to

<property name="QueryLanguage" type="string">en-GB</property>
 

Now import the web part back to the page and remove the old Search Core Results web part.

The search results will now always be in the language you chose, no matter what the browser language is.

Posted by Mel Gerats | 1 Comment

Mar
28

Preserve created and modified information when importing a document in SharePoint.

I’m currently writing a web service on our SharePoint server to upload documents because one of our clients would like to migrate from a third party document management system to SharePoint.

This client would like to keep the legacy dates like the date of creation and the last modified date. After researching this, I still couldn’t find a way to do this. I noticed there are tools out there are able to do this so it is definitely possible.

So after some more trial and error I finally figured it out. And it wasn’t even that exotic, so I’d like to share how it is done.

When you’ve uploaded the file and checked it in you can change the dates with the following code:

public void UpdateFileDates(
string siteCollectionUrl, string site, 
string file, DateTime created, DateTime modified)
{
    if (siteCollectionUrl == null) 
       throw new ArgumentNullException("siteCollectionUrl");
 
    using (var spSite = new SPSite(siteCollectionUrl))
    using (var web = string.IsNullOrEmpty(site)
                        ? spSite.RootWeb
                        : spSite.OpenWeb(site))
    {
        var spFile = web.GetFile(file);
        if (spFile != null)
        {
            spFile.CheckIn("");
            var item = spFile.Item;
 
            if (item != null)
            {
            item["Created"] = created;
            item["Modified"] = modified;
 
            spFile.CheckOut();
            item.Update();
            //When you do overwritecheckin the 
	   // version doesn't change.
            spFile.CheckIn("", SPCheckinType.OverwriteCheckIn);
            }
        }
    }
}
Posted by Wim De Coninck | 1 Comment

Feb
27

Public website for EU Issue Tracker

EU Issue Tracker
 
Today we have launched the new website for EU Issue Tracker, the online service to anticipate, monitor and manage EU Legislation & Policy.
 
The site is completely developed using Microsoft SharePoint, and integrates with data from the back-end databases.
 
 
 
Posted by Olivier Mangelschots | Leave your feedback

Feb
11

Orbit One @ European SharePoint Best Practices Conference

From 6 to 8 April there is a very interesting conference in London.

Some very known speakers will be there: Joel Oleson, Andrew Connell, Ben Curry, Bob Fox, Eric Schupps, John Timney, …

The same conference was organized in San Diego, California begin February 2009.

They promise it's not a typical "blabla" conference, the point is to go beyond introductions and focus on best practices gathered by on-the-field experience.

Agenda http://www.sharepointbestpractices.co.uk/Agenda.html

From Joel's blog:

Joel Oleson

"I think the main difference that really stands out to me on this conference vs other SharePoint conferences is the prescriptive nature of the content, with the real world, case study and experience based emphasis. Speakers are grilled on making sure you cover the true WHY and not focus so much on HOW TO. The content is scrubbed to encourage depth and thought in WHY something should be done or not done."

Orbit One will be there!

Viktor, Mel, Rik, Bart and Olivier will join the conference in London. Are you coming too?
Let us know so we can have a beer!

Posted by Olivier Mangelschots | Leave your feedback

Feb
04

New portal www.iec-iab.be has been launched

IAB
 
On February 3rd, 2009 we have proudly launched a new website portal for the Institute of Accountants and Tax Consultants.
 
This large SharePoint portal has a public section and a password protected zone with information for the Institute members and internships.
 
Microsoft Dynamics CRM 4.0 is used as the central members' directory. It's integrated with SharePoint to provide an automated user account and permission management service.
 
Posted by Olivier Mangelschots | Leave your feedback

Nov
16

jQuery and Microsoft SharePoint

what is jQuery?

jQuery is a lightweight open source JavaScript library (only 15kb in size).

Just recently Microsoft and Nokia announced they will support the JQuery library in their products! Initially they wil integrate it in Visual Studio and use within Microsoft's ASP.NET AJAX framework and ASP.NET MVC Framework.

I'm currently integrating jQuery in MOSS 2007 sites. A first examples is our client pages. I will soon post some tips.  

SharePoint
JQuery

Posted by Bart De Jonge | Leave your feedback

Contact us - Raas Van Gaverestraat 83, 9000 Gent, Belgium - Tel. +32 (9) 330.15.00 - Privacy Statement - Sitemap - Sign In Developed with Microsoft Office SharePoint Server 2007