Related Topics
Understanding how Internet Services accesses images and resources
The FirstClass server stores images, pictures, icons, forms, language files, and help files for the client and Internet Services in the FirstClass Resource Registry, located on the administrator's Desktop.
If you support multiple sites that use the same pictures or images, place the images in the Resource Registry. If your sites use different or customized pictures or images, you must place the images in the site-specific Images folder in the same location as the site templates. If Internet Services cannot find a picture or image in the site-specific Images folder, it will look in the Resource Registry. For information on the FirstClass server resources, see FirstClass resources.
All pictures and images must have unique names and ID numbers.
Here is the structure of the FirstClass Resource Registry, for an English setup, and what it contains:
Internet Services follows the same path to access all resources (images, pictures, and languages) and goes through all of the locations in this chain to find the most recent versions, and will stop the hunt chain as soon as it finds an appropriate resource:
• the current language folder (if you have languages defined for the site)
• the current site folder (or cluster folder if running a clustered environment)
• the Resource Registry
• the Config folder (in the same location as the Internet Services executable) on your Internet Services.
If you access an object through a path, "/Images", Internet Services follows this hunt chain:
• the Images folder in the active folder (for example, site folder or language folder, depending on how you have configured your Multiple Sites & Languages form.
• the Resource Registry
A breakdown of items in the Resource Registry
The resources contained in your system's Resource Registry are available to any user who connects to your server.
English Resources (Internet Services does not use this file)
English Resources contains standard registration and licensing forms and is the repository for legacy client forms.
Pictures.rez file
Pictures.rez contains legacy pictures and images (Mac OS PICT files without an extension) you could previously not place directly in the Resource Registry. This file is maintained for backwards compatibility.
Although you can put pictures and images in this file, we do not recommend it. Instead, pictures and images used for all all sites should be put in the Resource Registry and site-specific pictures should be put in the Images folder at the site-root level.
The Icons.rez file
Icons.rez file contains standard icons and custom icons. If you want to display the same icons in both the FirstClass client and the web client you must add them to your Icons.rez file.
If you have either a multiple-site or a multiple-language site setup and you want different icons for each site, you must create an Icons.rez file and place it in each of the site folders at the root level (for example, at the same level as the .sitepref form).
The MobileIcons.rez file
MobileIcons.rez contains icons specific to the mobile templates. This file sits in the Resource Registry only because of these lines located in the HeaderMatch document:
*: IF User-Agent == "UPG1 UP/4\\.0 (compatible; Blazer 1\\.0)" SET .templates = .mobiletemplates AND SET icons = mobileicons.rez
*: IF User-Agent == "Mozilla/2\\.0 (compatible; MSIE 3\\.02; Windows CE; 240x320)" SET .templates = .mobiletemplates AND SET icons = mobileicons.rez
If you want to run mobile templates on a separate site, you could put the MobileIcons.rez file in the site folder, rename it Icons.rez and remove the line in the HeaderMatch document.
The En.rez file
En.rez contains language strings, forms, and other resources not residing in any other resource file. If you have custom forms, place them in the en.rez file. On another language site, you would have a different lang.rez file located in the Resources Registry (for example, fr.rez (French) or es.rez (Spanish), or files for different dialects (for example, en-us.rez).
For information on how to create a resource file, see FirstClass Designer.
Understanding how languages work in Internet Services
The templates shipped with FirstClass Internet Services are language independent; they draw all of their strings from lang.rez files. This means, instead of having to translate each template on your system, the correct language strings are pulled from the appropriate lang.rez file. The only things you have to translate on your site, if desired, are your home page and objects in your FirstClass Network Store (both of which are independent of the language settings files).
As a standard, language settings files are named lang.rez, where lang is the ISO code name of the language or dialect that you want to represent, for example es.rez for Spanish or en-us.rez for American English.
If you are configuring multiple languages on your site, the order of preference is set by the user's web browser. The first language in this list is the user’s default language. Internet Services uses the following search sequence based on the user’s preferences and how he has configured his browser:
• the user’s default language
• other languages on the user’s browser language list
• the default language defined for your server.
The order in which you define languages for a site on the Multiple Sites & Languages form is not important, except for the first language, which acts as the default language for that site. Otherwise, order has no effect since it is the preference order of the browser that is used.
If you are running a multi-site setup and have separate language folders within the site folder, you must enter the same language names in "Languages" on the Multiple Sites & Languages form. If you do not have separate language folders on your site and just want to support multiple languages, leave this field blank.
If a browser requests a language and that language file is in one of the locations in which Internet Services looks, then that language is displayed regardless of the content in the "Languages" field on the Multiple Sites & Languages form. If you do not have a language file on your system that matches the browser's requested language, Internet Services will use the default language specified on the Advanced Web & File form.
Language dialects
Internet Services does dialect fallback before it does language fallback.
The resource hunt chain takes precedence over the language hunt chain. Internet Services will look for resources in the entire hunt chain in one language before falling back to the next language.
For example, if you have this order in your browser list :
a) English-us (en-us)
b) French (fr)
c) English (en)
Internet Services will search for the desired language in this order:
a) en-us
b) en
c) fr
d) en
Since en-us is a dialect of English, if Internet Services cannot find this in your system settings, it will search for a general en language file before moving on to the next language (French in this case).
If you use unconventional names, browsers may not list them in their preferences unless you instruct them to do so. Language names can consist of any alphanumeric characters and the dash (-). We recommend using ISO specified codes.
If the lang.rez file is not present for a language that you require you have a couple of options:
• take a lang.rez file from a localized FirstClass client, rename it to an appropriate lang.rez file (for example, es.rez or fr.rez). All the strings will be translated in the web templates the same way they are displayed in the client.
or
• copy the contents of an existing lang.rez file to a new file, translate the strings into any language, and rename the file with the appropriate ISO code.
The client version must match the web template set version, which must be version 8.0 or higher.
If you are creating a lang.rez file from scratch, choose a character set appropriate for your language (see Charset Files on FirstClass Online (FCOL) in FirstClass Webmasters\Resources\General Resources\Charset Files). Use Windows character sets where possible; if unavailable use Mac OS X character sets.
Keep in mind, if you are translating to a language that cannot use Mac Roman you must select an appropriate character file. Further, you must make this choice before you begin editing or you will have to completely redo the language file once the error is detected.
Accessing images entered on the .sitepref form
You can use the .sitepref form to customize the look and feel of your user's FirstClass web interface. For information, see About changing web site preferences. By default, images are entered on the .sitepref form Images tab, but you can apply custom images to display on your web site. Internet Services accesses images entered on this form in this order:
• if the name of the image or resource starts with a tilde (~), for example ~image.jpg, Internet Services looks in the Home Page Folder located on the user’s Desktop
All images in this folder must have a valid extension (for example, .gif, .png, or .jpg) for them to be displayed on the web.
• if the image or resource has no extension, Internet Services looks in the pictures.rez file (for legacy resources).
We recommend that you always put an extension on images or other resources.
You cannot have an object called Pictures, as the name is reserved for the pictures.rez file (see Illegal object names).
• by a fully qualified path in your document, for example, http://www.ads.com/myads/ image1.gif.
|