Back to the basics: Culture

In a previous post about basic concepts, I’ve talked a little bit about the version number and about the different “types” of version you can find in an assembly. Today, I’ll proceed with the basics concepts series and we’ll take a quick detour into Cultures.

Cultures are identified by a string which can contain two parts, known as primary and secondary parts (I’ve seen them called tags too). Here’s an example: “en-GB”. The previous string identifies the current culture as British English. Notice that the secondary part isn’t really required (in that case, you’d end up with the string “en” and you could only infer that  the culture is English).

When building culture-aware applications, you should always have a culture neutral assembly (which contains code and the application’s default resources) and then create one or more separate assemblies which contains only culture specific resources (these assemblies are known as satellite assemblies). The only thing you need to keep in mind is that you must take some care when deploying your culture assemblies: by default, they must be put it in a subdirectory whose name matches the culture of the assembly (if your app is in a folder named Dumb and you’re deploying a British English assembly,  then you need to put that culture specific assembly in the Dumben-GB folder).

Before ending, don’t forget that the culture of the current assembly is also part of its identity! And I guess that’s it for now.

Advertisements

~ by Luis Abreu on April 14, 2010.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: