Demonstrates how to match the user's language settings against languages supported by the server and display content specific to the user's locale. The server attempts to use the language setting to display a localized phrase loaded from a resource and the appropriately formatted system time.
Use a browser to view ShowLocalized.srf. The server will attempt to use your language settings to display a localized phrase and the current system time formatted according to the language supported by the server that most closely matches your language settings. Change your browser's language settings to see that the server recognizes the priority you give to each language. Try changing your favored language to one that is not directly supported by the server. In Internet Explorer, you can change your language settings. On the Tools menu, click Internet Options. On the General tab, click Languages and select the appropriate language settings.
The request handler parses the HTTP_ACCEPT_LANGUAGES request header to get a prioritized list of languages supported by the client. The server then compares the languages accepted by the client with the list of languages supported by the server. The best match is used to display the message and system time.