| Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual | |||
Certain types of data such as dates and numbers, should be formatted differently for display depending on the language of the end user. The VA FileMan LANGUAGE file has been designed to help solve this problem for users of interactive VA FileMan. The LANGUAGE file stores M code used to perform language-specific conversions on such data. A system variable identifies to VA FileMan the language currently in use.
At this time, VA FileMan distributes in the LANGUAGE file only the English equivalent of language-specific data conversions specified below.
A system variable, DUZ("LANG"), identifies to VA FileMan the language currently in use. This system variable is set equal to a number that corresponds to the ID NUMBER of an entry in the LANGUAGE file. It tells VA FileMan where to find the appropriate data conversion code from the LANGUAGE file at the time the code needs to be executed (for example, when printing a date). For users running Kernel V. 8.0 or later, this variable is set automatically during signon.
Developers may enter or create their own entries in the LANGUAGE file. The VHA Database Administrator will assign an ID NUMBER for each unique language entry in the LANGUAGE file. If developers do not follow these guidelines, their language entry may be overwritten when VA FileMan is installed.
The following Language file entries have been assigned and are distributed with VA FileMan:
| 1 | English |
| 2 | German |
| 3 | Spanish |
| 4 | French |
| 5 | Finnish |
| 6 | Italian |
| 10 | Arabic |
| 11 | Russian |
Developers may enter or edit entries in the LANGUAGE file using VA FileMan Enter/Edit. The only required fields are the ID NUMBER that uniquely identifies a language and the language NAME. If M code is not found within the current language for a specific conversion, VA FileMan will default to use the English equivalent.
The other fields that can be entered for any LANGUAGE file entry are described below. At the time the code in any of these fields is executed, the data to be converted will be in the local variable Y. The M code in the field should put the transformed output back into Y, without altering any other local variables. More detail can be found in the field description for each field. Looking at the English equivalent in entry number 1 may also be helpful.
| ORDINAL NUMBER FORMAT | Changes 1 to 1ST, 2 to 2ND, etc. |
| CARDINAL NUMBER FORMAT | Changes 1234567 to 1,234,567 |
| UPPERCASE CONVERSION | Converts text to uppercase |
| LOWERCASE CONVERSION | Converts text to lowercase |
| DATE/TIME FORMAT | Converts date in internal VA FileMan format to MMM,DD,YYYY@HH:MM:SS |
| DATE/TIME FORMAT (FMTE) | Does other date conversions from date in internal VA FileMan format. This call has an additional input flag that indicates the conversion to be done. |
The flags are:
| 1 | MMM DD, YYYY@HH:MM:SS | Space before year |
| 2 | MM/DD/YY@HH:MM:SS | No leading zeros on month,day |
| 3 | DD/MM/YY@HH:MM:SS | No leading zeros on month,day |
| 4 | YY/MM/DD@HH:MM:SS | -- |
| 5 | MMM DD,YYYY@HH:MM:SS | No space before year |
| 6 | MM-DD-YYYY @ HH:MM:SS | Special spacing for time |
| 7 | MM-DD-YYYY@HH:MM:SS | -- |
| S | Always return seconds | |
| U | Return uppercase month (use only with 1 or 5) | |
| P | Return time with am,pm | |
| D | Return only date without time | |
Reviewed/Updated: March 8, 2007