The gate.asp file provides users with a common entry point to the application. In addition, this file performs several tasks central to presenting the application.
The PT application contains several instances of gate.asp. One instance resides in the root directory. It creates an instance of the Litware.Lingo component and calls the component's SniffLang method to detect the language of the browser requesting the page. SniffLang attempts to find a match for the browser's language among the application's supported languages according to Internet Explorer's Language Preference settings. If the method fails to find an exact match, such as a specific regional variant of a language—en-us or en-uk, for example—it then tries to find a close match—any variant of English. See Lingo.cls to view the code for this method.
If HTML pages that support the requested language exist, gate.asp directs the browser to the HTML files for that language. If the application has a lingo.xml file for the language but HTML files do not yet exist, the application displays the standard HTTP error indicating that the files were not found, and the administrator must select the language from the Build menu to create the files. After the full set of localized HTML files exists for a language, browsers requesting that language get the version of the gate.asp file that resides in the directory for that language.
The gate.asp file performs the following tasks in the PT application:
See Two Versions of gate.asp for discussions of the globalized gate.asp in the application's root and the localized gate.asp in the directories for each language the application supports.