How to change CSS style sheet with language in nopCommerce

Today, we will learn how to change css stylesheet with language in nopcommerce site.

For an instance, if any store admin have multiple languages installed onthenopcommerce site and the stylesheet need to be change when language is changed so that design can be updated according to the language content.

In this example, if we have 2 languages installed (english & german)

If store admin have two different themes installed on the store site (one for each language).


The IDs of the languages can be-

English – ID 1

German – ID 2

This code can be included in the view-


var workingLanguageId = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Id;
if (workingLanguageId == 1)
  Html.AppendCssFileParts(string.Format("/Themes/{0}/Content/css/englishstyle.css", themeName));
else if (workingLanguageId == 2)
  Html.AppendCssFileParts(string.Format("/Themes/{0}/Content/css/germanstyle.css", themeName));

That’s all – Save changes.

Hope it helps!


 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under nopCommerce | RSS 2.0

Author Spotlight

Lavish Kumar

Founder, developer and owner of - By profession, he is a software programmer / web developer, web designer & DBA. He is passionate about technology and electronic gadgets. He enjoys writing tech articles and developing web applications. He is a nopCommerce MVP and author of official nopCommerce Designer's Guide.

Leave a Reply

Your email address will not be published. Required fields are marked *