Click here to Skip to main content
15,889,808 members
Articles / Web Development / XHTML

Localization for Scripts (JavaScript) and Style Sheets in ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.75/5 (15 votes)
15 Nov 2014CPOL4 min read 63.1K   352   27  
Often JavaScript content and/or styles in ASP.NET need to be localized too. This article shows how this can be leveraged by using an HttpHandler.
/* <resourceSettings>
      <resourceLocation name="WebStylesResources" type="SmartSoft.Resources.WebStyles, SmartSoft.Resources, Version=1.0.0.0, Culture=neutral" />
   </resourceSettings> */

body
{
    background-color: <%$ Resources: WebStylesResources, BodyBackgroundColor %>;
}

a
{
    color: White;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Swissworx
Australia Australia
MCAD, MCPD Web Developer 2.0, MCPD Enterprise Developer 3.5

My company: Swissworx
My blog: Sitecore Experts

Hopp Schwiiz Smile | :)

Comments and Discussions