Previous Topic: APSXLate Library IntroducedNext Topic: Translation Files


Install and Configure APSXLate

The library consists of a single library called APSXLate (a DLL on Windows NT, SO on Solaris) and a single executable called APSXlateTest (an EXE on Windows NT).

A directory called Language is also required. This directory will contain the language translation files.

The APSXLate library locates the Language directory using the following rules.

  1. (Windows ONLY) From directory where DLL was loaded, use subdirectory called Language
  2. Use environment variable APS_LANG_PATH
  3. (Unix ONLY) Use $SMHOME/Language
  4. Use ./Language/
  5. Use ./

Log Files

The library may need to write log information. If so, it will create a log filenamed using the current date in the format YYYYMMDD.log.

These log files will be placed in a subdirectory under the language directory (see above) called "logs", if the subdirectory already exists. If it does not already exist, the files will be placed in the language directory itself.

You can also specify the directory into which the logs are to be placed using an environment variable called APS_LANG_LOGS.

Note that wherever the files are to be placed, the current user must be able to create and write to this directory. If the directory does not exist or is not writable, no logs will be written.

As little information as possible is actually written to the log file, in order to boost performance and reduce the disk space requirements.

Translation file parsing errors, missing translation keys, and reload notifications (this occurs when a translation table is reloaded because the underlying files have changed) are the only items logged at the time of this writing. The DEBUG keyword (usable in translation files, see the next section) may, in the future, cause additional logging to occur.

Log files are only opened when required. Once opened, it will stay open until the process terminates or a log is written on a different date. Therefore, an older file might remain open after its date. The next log will cause the old file to be closed a new one opened.

The log files are primarily used to track missing translations. If an application requests the translation of a key that is not defined in the translation files, the key and default values are logged (the default is recorded so that no logging will occur until the translation files are reloaded).

By periodically watching for log files, a site can tell if unusual languages or countries are being requested or if a translation key is missing from a translation file.

APSXlateTest

This file is an executable that can be used for testing. Use a command line argument of -? to request its possible command line arguments.