Click here to Skip to main content
15,896,557 members
Articles / Web Development

Localizing WebSites, JavaScript and Assemblies with simple RESX files

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
10 Dec 2012CPOL11 min read 30.8K   246   19  
History of globalization in ASP.NET and available options.
<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <appSettings/>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
    <httpRuntime/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
    <machineKey/>

    <!-- Notice to auto: on the uiCulture, it enables browser based culture detection
         Also it's always a googd idea to force culture to en.
         This way date and mathematical functions always use the same culture. Otherwise you are gonna be in for surprises.
         culture: date/time/math,  uiCulture: userInterface
    <globalization culture="en" uiCulture="auto:en" />
    -->

    <!-- Now this one should do the same as above, but it really doesn't work very well
    <globalization enableClientBasedCulture="true"/>
    -->
  </system.web>
  <system.webServer>
    <handlers>
      <add name="Localization" path="/translations" verb="GET" type="LocalizedWebSite.LocalizedJsHandler, LocalizedWebSite"/>
    </handlers>
    <modules>
      <!-- This is my prefered method of setting cultures in a website 
       It operates on a very low level and allows for alot of customization
      -->
      <add name="Localization" type="LocalizedWebSite.LocalizationModule, LocalizedWebSite" preCondition="managedHandler" />
    </modules>
  </system.webServer>
</configuration>

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
Software Developer (Senior) Index Multimedia
France France
Internet & Technology related professional since 1994. Passionate about WEB 2.0 and Community/Social networking related type Websites, or anything that is tech related to bridging the gap between the User and his everyday Multimedia Experience.

Comments and Discussions