You are here:   Home
  |  Login
DotNetNuke Core Team
Microsoft MVP
 Bookmark this article!
delicious.com delicious.com
digg digg
technorati technorati
reddit reddit
stumbleupon stumbleupon
facebook facebook
google bookmarks google bookmarks
yahoo bookmarks yahoo bookmarks
slashdot slashdot
live live
twitter twitter
DotNetKicks DotNetKicks

Tags

  1. 1 items are tagged with Admin settings
  2. 1 items are tagged with AJAX Extensions
  3. 1 items are tagged with ASP.NET
  4. 2 items are tagged with BBeyond
  5. 1 items are tagged with Caching
  6. 1 items are tagged with Cambrian
  7. 1 items are tagged with CBO
  8. 2 items are tagged with Codeplex
  9. 1 items are tagged with debugging
  10. 1 items are tagged with DotNetNuke
  11. 2 items are tagged with DotNetNuke 5
  12. 1 items are tagged with Email
  13. 1 items are tagged with email validation
  14. 1 items are tagged with GMail
  15. 1 items are tagged with Google
  16. 1 items are tagged with Google Apps
  17. 1 items are tagged with IBaseEntity
  18. 2 items are tagged with IdentitySwitcher
  19. 1 items are tagged with IHydratable
  20. 1 items are tagged with Inline Skin Object
  21. 2 items are tagged with Installation
  22. 1 items are tagged with Installer
  23. 1 items are tagged with intellisense
  24. 1 items are tagged with IPropertyAccess
  25. 1 items are tagged with Language
  26. 1 items are tagged with Manifest
  27. 1 items are tagged with moving
  28. 1 items are tagged with OpenForce
  29. 1 items are tagged with Permissions
  30. 1 items are tagged with Profile Properties
  31. 1 items are tagged with PropertyEditorControl
  32. 1 items are tagged with recent projects
  33. 1 items are tagged with regex
  34. 1 items are tagged with Sample Module
  35. 1 items are tagged with Search Results
  36. 2 items are tagged with Skin Object
  37. 1 items are tagged with Skinning
  38. 6 items are tagged with SQL
  39. 1 items are tagged with SQL Server
  40. 1 items are tagged with SQL Server 2008
  41. 1 items are tagged with Table Functions
  42. 2 items are tagged with TellCo
  43. 1 items are tagged with TokenReplace
  44. 2 items are tagged with Too Good to be True
  45. 1 items are tagged with Twitter
  46. 2 items are tagged with UPC
  47. 2 items are tagged with Upgrading
  48. 1 items are tagged with Users
  49. 2 items are tagged with visual studio
  50. 1 items are tagged with Visual Studio 2008

My Twitter Feed...

Thu, 29 Jul 2010 16:45:45 +0200

erikvb: Gettin unhealthy food. Yummy!

Thu, 29 Jul 2010 07:06:10 +0200

erikvb: RT @mashable: Google Makes Custom Web Typography Ridiculously Easy - http://ow.ly/2i8DG

Wed, 28 Jul 2010 05:05:48 +0200

erikvb: @Alyssa_Milano cool, you have a clone AND you are followed by @wilw . I can only dream of achieving the same...

Tue, 27 Jul 2010 22:20:49 +0200

erikvb: http://bit.ly/bwCZdB (Popularity is Everything: A new approach to protecting passwords from statistical-guessing attacks)

Tue, 27 Jul 2010 16:51:58 +0200

erikvb: RT @Telerik: Win an iPad or Telerik Ultimate licenses. Contest details at http://bit.ly/99ep9O [please RT]

Tue, 27 Jul 2010 10:06:20 +0200

erikvb: RT @TimoBreumelhof: Small bugfix for Style Helper #DNN #skin object posted: http://dnnskinextensions.codeplex.com/releases/view/47234

Mon, 26 Jul 2010 18:39:00 +0200

erikvb: @jbrinkman have fun playing with it :)

Mon, 26 Jul 2010 18:34:22 +0200

erikvb: @schotman als het maar droog blijft

Mon, 26 Jul 2010 17:51:38 +0200

erikvb: RT @christoc: RT @DNNCorp Get new insights from #DotNetNuke CEO Navin Nagiah at CMS Critic: http://bit.ly/aqkKwm

Sun, 25 Jul 2010 20:35:09 +0200

erikvb: RT @Heuserkampf: This will be interesting: Facebook lets publishers contact “likers”: http://bit.ly/9orOQN

The Language SkinObject explained

Last Updated 09/17/2008
By: Erik van Ballegoij

This blog is long overdue. In DotNetNuke 04.06.00 the language skinobject was beefed up to be much more versatile. Apart from just a dropdown menu, it can also display links to languages. Even though Lorraine blogged about the new appearance, there is much more to the skinobject than meets the eyes!

The skinobject supports 2 display modes: dropdown menu and template based repeater (you can even use both at the same time). Apart from that, there is a common header and a common footer available (both templatable).

All templates of the skinobject use the DNN core TokenReplace functionality as template engine. This means that you can control visible appearance of the language skin object to a great extent.

First, let us look at all attributes of the skinobject:

Attribute Name

Functionality

Allowed values

Default Value

CssClass

String attribute, used to style the language dropdown list

Any valid CSS Class name

[empty]

ShowMenu

Boolean attribute, used to either display or hide the dropdown menu

Tue, False

True

ShowLinks

Boolean attribute, used to either display or hide the language links repeater

True, False

False

CommonHeaderTemplate

String attribute for template to be used as common header

Any valid string

[empty]

HeaderTemplate

String attribute for template to be used as repeater header

Any valid string

 

ItemTemplate

String attribute for template to be used as repeater item

Any valid string

[CULTURE:NATIVENAME]

AlternateTemplate

String attribute for template to be used as alternate repeater item

Any valid string

[empty]

SeparatorTemplate

String attribute for template to be used as repeater separator item

Any valid string

 

FooterTemplate

String attribute for template to be used as repeater footer item

Any valid string

[empty]

CommonFooterTemplate

String attribute for template to be used as common footer

Any valid string

[empty]

In order to facilitate the display of cultures, a CulturePropertyAccess class was created, which is used to render the name of a culture based on the different display attributes of the .NET CultureInfo  class. Inside the different template you can use the following CULTURE token properties to display the name of a culture:

[CULTURE:DISPLAYNAME]

Gets the culture name in the format " ()" in the language of the localized version of .NET Framework.

[CULTURE:ENGLISHNAME]

Gets the culture name in the format " ()" in English.

[CULTURE:LCID]

Gets the culture identifier for the current CultureInfo

[CULTURE:NAME]

Gets the culture name in the format "-".

[CULTURE:NATIVENAME]

Gets the culture name, consisting of the language, the country/region, and the optional script, that the culture is set to display.

[CULTURE:TWOLETTERISOCODE]

Gets the ISO 639-2 three-letter code for the language of the current CultureInfo

[CULTURE:THREELETTERISOCODE]

Gets the ISO 639-1 two-letter code for the language of the current CultureInfo

(Descriptions copied from http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo_members.aspx)

By the way: the CULTURE token is available throughout DotNetNuke in every module that supports TokenReplace

The following tokens are also supported inside the Language skinobject template:

[URL]

This will generate the correct URL for the current page in a specific culture

[FLAGSRC]

The name of a flag image (.gif only) for a specific culture, in the format "-.gif".

[SELECTED]

Returns “True” if a specific culture  is the current culture.

[LABEL]

Inserts the Label text from the resource file.

[I]

Returns the directory that holds the core country flag images (/images/Flags)

[P]

Returns the portal directory

[S]

Returns the directory of the current skin

[G]

Returns the global (host) skin folder

 

Some samples:

Display

Code (ascx)

Description

Sample 1

Default configuration in default DotNetNuke skin.

Sample 2

Displays only dropdownlist

Sample 3

Displays dropdownlist and flag of currently selected language

Sample 4

Displays text links for languages. Selected language has different classname

 

(cross posted from my blog on dotnetnuke.com)

Rate this:
Recent Comments
Hi, I don't want show the flags, and I am trying show name, but in the nativename it show English (United States). Can I show only English? Best Regards.
Posted By: Jose Garrido on 11/13/2008
AFAIK you cannot display only the name of the language in .NET. Since DNN only uses the .NET methods to display these names, DNN cannot do it either. My own language selector (MLLanguageSelector) allows you to link to a resource file for language names, so you can use anything there. Check out my company site (www.apollo-software.nl) for more information
Posted By: Erik van Ballegoij on 11/18/2008

Powered By

DotNetNuke Powered! This site is proudly powered by DotNetNuke.

 

(Advertisements)

My other blogs

Thu, 21 May 2009 18:41:00 +0200

Fri, 01 May 2009 14:57:00 +0200

Wed, 29 Apr 2009 16:11:00 +0200

Mon, 27 Apr 2009 20:33:05 +0200

Wed, 21 Jan 2009 20:13:00 +0100

Mon, 05 Jan 2009 23:00:00 +0100

Fri, 05 Dec 2008 16:45:08 +0100

Sun, 05 Oct 2008 22:23:00 +0200

Wed, 17 Sep 2008 14:07:00 +0200

Sun, 24 Aug 2008 21:23:00 +0200