views:

73

answers:

2

Lets try keep this simple.

Given a SharePoint site (english) and a feature (localized with resource files) to English (default) and Czech (but could be any language).

Why do I need to install a Czech Site Collection to get the Czech localization strings to work. I thought localization worked from user context, IE: based on the currently logged on users regional settings which trickle through to the browser?

A: 

I believe a feature LCID will be related to the RootWeb.Locale.LCID of the Site Collection.

That said, you probably need to code your own logic to grab culture info and display your respective resource file.

F.Aquino
A: 

A feature is not really meant for "end users", but for site admins to roll out only. So localization files pertaining to the feature itself (i.e. description, title etc.) are shown in the language of the site collection. Any controls and aspx pages etc. you create though could be localized for the display language of the current user's browser, just use the normal ASP.NET way of doing this. To be able to have your site actually listen to the user's language preference you need to change the web.config of the web app also though by setting the globalization to auto like so:

<globalization fileencoding="utf-8" uiCulture="auto" culture="auto" />

Any aspx page needs to have Culture="auto" UICulture="auto" in the <%@ Page directive.

Al off the above is an "excerpt" from Hristo Yankov's excellent article.

Colin