Arbortext Command Language > Functions by Alphabetical Listing > locale_file_name
  
locale_file_name
path=locale_file_name(file[, dir])
This function returns the location of the localized file specified by the file parameter (remember to include the extension). The optional dir parameter is available for manually specifying a directory for searching. If, for example, you specified a dir of /test, the function would search for the specified file in the following locations:
1. \test\lib\locale\syslocale
2. \test\locale\syslocale
3. \test\lib
4. \test
The syslocale subdirectory corresponds to the current system locale setting. You can determine the current system locale using the getlocale function. If the three-character locale directory is not found (for example, "ENU"), Arbortext Editor tries the two-character version formed by dropping the last letter (for example, "EN").
If the optional dir parameter is not specified, the function automatically substitutes the Arbortext Editor installation directory (Arbortext-path) for the dir parameter and searches the same set of subdirectories.
If the function executes successfully, it returns the string for the path to the desired file. If the function fails, it returns the value Arbortext-path\lib\file, whereArbortext-path is the Arbortext Editor installation directory, and file is the value of the file argument.
Examples
path = locale_file_name('message.amo')
path = locale_file_name('message.amo','/test')
Related Topics
getlocale function