Tuesday, September 9, 2008

Dynamically Switching DotNetNuke StyleSheets with the Current Language

If your design requires you to embed text in an image in a multi-lingual DotNetNuke website, embed your text into images and switch them with CSS.

Simply override the styles from the base module.css stylesheet in a separate stylesheet and switch them dynamically using the following line of code directly in your skin:


<link href="<%= SkinPath %>languagespecific-<% =CType(Page, PageBase).PageCulture.Name %>.css" rel="stylesheet" type="text/css" />


This will be rendered as the filename languagespecific-en-US.css in the root of your skin for the default DNN language and switch every time the user switches their language.

Happy Nuking,

Ryan Morgan
Arrow Consulting & Design

Arrow Consulting & Design is a consulting firm based in West Palm Beach, Florida specializing in DotNetNuke, ASP.NET, SQL and WPF Development with a portfolio filled with local, national, government and global enterprise clients.

Case Studies: Click Here
Main Corporate Site: http://www.arrowdesigns.com/default.aspx?utm_source=blogspot
DotNetNuke Community Site: http://www.arrownuke.com/default.aspx?utm_source=blogspot
Consulting Inquiries: Click Here
Skin Design/Conversion: Click Here
DotNetNuke Portfolio: Click Here

6 comments:

Anonymous said...

In the present era of ecommerce, software development services such as application development, custom software development, agile software development, web application development et al are highly sought after by people worldwide to lift up their online business. However, if you are looking forward to avail of any of these services or any other software development service, you should come in touch with http://www.infysolutions.com as soon as possible

Anonymous said...

A website is the face a company on the web, since companies utilize the web to communicate with their customers and suppliers. It is the primary means of attracting both old and new clients and is also a medium for advertising. http://www.infyecommercesolution.com/

Empress Cruises & Events said...

Nice Post, now days a website is a kind of Online Profile showing your online presence. It is important to keep your website look updated and user friendly. Thanks for sharing nice post on DNN Development, keep it up.

Madhuri Naidu said...

Ur blog taught me the importance of CSS and the work that was advatageous using it to make the best website design.
Ecommerce Software

Unknown said...

As i go through your post, i found your post quite informative. Thanks..
Seo forum

Unknown said...

In the Dotnet nuke dynamical services is very important for that reputation. This is nice for the users. Thanks

Hire Our Dedicated Professional Dotnet Nuke Web Developer India