In this section: |
How to: |
Reference: |
Master Files support column headings and descriptions in multiple languages.
The heading or description used depends on the value of the LANG parameter and whether a TITLE_ln or DESC_ln attribute is specified in the Master File, or a set of translation files exist for the Master File, where ln identifies the language to which the column heading or description applies.
In a Master File, column headings are taken from:
Issue the following command in a supported profile or in a FOCEXEC:
SET LANG = lng
or
SET LANG = ln
where:
Is the three-letter abbreviation for the language.
Is the two-letter ISO language code.
Note: If SET LANG is used in a procedure, its value will override the values set in nlscfg.err or in any profile.
In the nlscfg.err configuration file, issue the following command:
LANG = lng
Language Name |
Two-Letter Language Code |
Three-Letter Language Abbreviation |
---|---|---|
Arabic |
ar |
ARB |
Baltic |
lt |
BAL |
Chinese - Simplified GB |
zh |
PRC |
Chinese - Traditional Big-5 |
tw |
ROC |
Czech |
cs |
CZE |
Danish |
da |
DAN |
Dutch |
nl |
DUT |
English - American |
en |
AME or ENG |
English - UK |
uk |
UKE |
Finnish |
fi |
FIN |
French - Canadian |
fc |
FRE |
French - Standard |
fr |
FRE |
German - Austrian |
at |
GER |
German - Standard |
de |
GER |
Greek |
el |
GRE |
Hebrew |
iw |
HEW |
Italian |
it |
ITA |
Japanese - Shift-JIS(cp942) on ascii cp939 on EBCDIC |
ja |
JPN |
Japanese - EUC(cp10942) on ascii (UNIX) |
je |
JPE |
Korean |
ko |
KOR |
Norwegian |
no |
NOR |
Polish |
pl |
POL |
Portuguese - Brazilian |
br |
POR |
Portuguese - Portugal |
pt |
POR |
Russian |
ru |
RUS |
Spanish |
es |
SPA |
Swedish |
sv |
SWE |
Thai |
th |
THA |
Turkish |
tr |
TUR |
How to: |
Reference: |
You can place TITLE_ln and DESCRIPTION_ln attributes directly in the Master file, where ln specifies the language code.
Note: You can also create a set of language translation files and include the trans_file attribute at the file level of the Master File. For information on this technique, see Storing Localized Metadata in Language Files.
FIELDNAME = field, ... . . . TITLE= default_column_heading, TITLE_ln = column_heading_for_ln, . . . DESC= default_desc, DESC_ln = desc_for_ln, . . .
where:
Is a field in the Master File.
Is the column heading to use when SET TITLES=ON and either the LANG parameter is set to the default language for the server, or another language is set but the Master File has no corresponding TITLE_ln attribute for that field. This column heading is also used if the ln value is invalid.
Is the description to use when either the LANG parameter is set to the default language for the server, or another language is set but the Master File has no corresponding DESC_ln attribute for that field. This description is also used if the ln value is invalid.
Specifies the language for which the column heading applies and the text of the column heading in that language. That column heading is used when SET TITLES=ON, the LANG parameter is set to a non-default language for the server, and the Master File has a corresponding TITLE_ln attribute, where ln is the two-digit code for the language specified by the LANG parameter Valid values for ln are the two-letter ISO 639 language code abbreviations. For information, see Languages and Language Code Abbreviations.
Specifies the language for which the description applies and the description text in that language. This description is used when the LANG parameter is set to a non-default language for the server and the Master File has a corresponding DESC_ln attribute. Valid values for ln are the two-letter ISO 639 language code abbreviations.
The following Master File for the CENTINV data source specifies French descriptions (DESC_FR) and Spanish descriptions (DESC_ES) as well as default descriptions (DESC) for the PROD_NUM and PRODNAME fields:
FILE=CENTINV, SUFFIX=FOC, FDFC=19, FYRT=00 SEGNAME=INVINFO, SEGTYPE=S1, $ FIELD=PROD_NUM, ALIAS=PNUM, FORMAT=A4, INDEX=I, DESCRIPTION='Product Number' DESC='Product Number', DESC_ES='Numero de Producto', DESC_FR='Nombre de Produit', $ FIELD=PRODNAME, ALIAS=PNAME, FORMAT=A30, WITHIN=PRODCAT, DESCRIPTION='Product Name' DESC_FR='Nom de Produit', DESC_ES='Nombre de Producto', $ FIELD=QTY_IN_STOCK, ALIAS=QIS, FORMAT=I7, DESCRIPTION='Quantity In Stock', $ FIELD=PRICE, ALIAS=RETAIL, FORMAT=D10.2, TITLE='Price:', DESCRIPTION=Price, $
The following Master File for the CENTINV data source specifies French titles (TITLE_FR) and Spanish titles (TITLE_ES) as well as default titles (TITLE) for the PROD_NUM and PRODNAME fields:
FILE=CENTINV, SUFFIX=FOC, FDFC=19, FYRT=00 SEGNAME=INVINFO, SEGTYPE=S1, $ FIELD=PROD_NUM, ALIAS=PNUM, FORMAT=A4, INDEX=I, TITLE='Product,Number:', TITLE_FR='Nombre,de Produit:', TITLE_ES='Numero,de Producto:', DESCRIPTION='Product Number', $ FIELD=PRODNAME, ALIAS=PNAME, FORMAT=A30, WITHIN=PRODCAT, TITLE='Product,Name:', TITLE_FR='Nom,de Produit:', TITLE_ES='Nombre,de Producto:' DESCRIPTION='Product Name', $ FIELD=QTY_IN_STOCK, ALIAS=QIS, FORMAT=I7, TITLE='Quantity,In Stock:', DESCRIPTION='Quantity In Stock', $ FIELD=PRICE, ALIAS=RETAIL, FORMAT=D10.2, TITLE='Price:', DESCRIPTION=Price, $
The default language for the server code page is English and, by default, SET TITLES=ON. Therefore, the following request, uses the TITLE attributes to produce column headings that are all in English:
TABLE FILE CENTINV PRINT PROD_NUM PRODNAME PRICE WHERE PRICE LT 200 END
The output is:
Product Product Number: Name: Price: ------- ------- ------ 1004 2 Hd VCR LCD Menu 179.00 1008 DVD Upgrade Unit for Cent. VCR 199.00 1026 AR3 35MM Camera 10 X 129.00 1028 AR2 35MM Camera 8 X 109.00 1030 QX Portable CD Player 169.00 1032 R5 Micro Digital Tape Recorder 89.00
Now, issue the following command to set the language to Spanish and run the same request:
SET LANG = SPA
The output now displays column headings from the TITLE_ES attributes where they exist (Product Number and Product Name). Where no Spanish title is specified (the Price field), the column heading in the TITLE attribute appears:
Numero Nombre de Producto: de Producto: Price: ------------ ------------ ------ 1004 2 Hd VCR LCD Menu 179.00 1008 DVD Upgrade Unit for Cent. VCR 199.00 1026 AR3 35MM Camera 10 X 129.00 1028 AR2 35MM Camera 8 X 109.00 1030 QX Portable CD Player 169.00 1032 R5 Micro Digital Tape Recorder 89.00