Professional ASP.NET 4.5 in C# and VB by Jason N. Gaylord & Christian Wenz & Pranav Rastogi & Todd Miranda & Scott Hanselman
Author:Jason N. Gaylord & Christian Wenz & Pranav Rastogi & Todd Miranda & Scott Hanselman
Language: eng
Format: epub
Publisher: John Wiley & Sons
Published: 2013-04-14T16:00:00+00:00
Making Modifications to the web.config File
Now that the Web.sitemap file is in place and ready, the next step is to provide some minor additions to the web.config file. In order for your web application to make an automatic detection of the culture of the users visiting the various pages you are providing, you must set the Culture and uiCulture settings in the @Page directive, or set these attributes for automatic detection in the <globalization> element of the web.config file.
When you are working with navigation and the Web.sitemap file, as in this example, making this change in the web.config file is actually best so that it automatically takes effect on every page in your application. Adding it to the web.config file makes it much simpler because you won’t have to make these additions yourself to every page.
To make these changes, open your web.config file and add a <globalization> element, as shown in Listing 17-32.
LISTING 17-32: Adding culture detection to the web.config file
<configuration> <system.web> <globalization culture="auto" uiCulture="auto" /> </system.web> </configuration>
For the auto-detection capabilities to occur, you simply set the culture and uiCulture attributes to auto. You also could have defined the values as auto:en-US, which means that the automatic culture detection capabilities should occur, but if the culture defined is not found in the various resource files, then use en-US (American English) as the default culture. However, because you are going to define a default Web.sitemap set of values, there really is no need for you to bring forward this construction.
Next, you create the assembly resource files that define the values used by the Web.sitemap file.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Ada | Ajax |
Assembly Language Programming | Borland Delphi |
C & C++ | C# |
CSS | Compiler Design |
Compilers | DHTML |
Debugging | Delphi |
Fortran | Java |
Lisp | Perl |
Prolog | Python |
RPG | Ruby |
Swift | Visual Basic |
XHTML | XML |
XSL |
Hello! Python by Anthony Briggs(9420)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9385)
The Mikado Method by Ola Ellnestam Daniel Brolund(9350)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(7892)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7437)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7408)
Grails in Action by Glen Smith Peter Ledbrook(7329)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7157)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6002)
Kotlin in Action by Dmitry Jemerov(4681)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(3981)
Functional Programming in JavaScript by Mantyla Dan(3740)
Windows APT Warfare by Sheng-Hao Ma(3072)
Learning Java by Patrick Niemeyer & Daniel Leuck(2889)
Mastering Python for Finance by Weiming James Ma;(2875)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(2865)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(2763)
WordPress Plugin Development Cookbook by Yannick Lefebvre(2680)
Mastering Java 9 by Dr. Edward Lavieri(2583)