User Tools

Site Tools


env_file.htm
Navigation:  Internationalization >ENV File Previous pageReturn to chapter overviewNext page

As of version 11 the recommended method to implement support for Unicode and international settings is to use the new PROP:Codepage and PROP:Locale properties . See the Internationalization topic.

An environment file contains internationalization settings for your deployed applications, and for the IDE itself. Environment files have an extension of .ENV.

Clarion IDE
You can specify internationalization settings for the Clarion IDE by modifying the CLARION.ENV file, which is located in the ..\Clarion\BIN folder. (the Database Browser also uses these settings when displaying data files).

Your Applications

When your program is started the Clarion run-time checks for the existence of an environment file with the same name as your program (appname.ENV), and loads it if found. If an environment file is not found, the run-time library defaults to standard English/ASCII.

The LOCALE procedure can be used to programmatically load environment files at run-time to dynamically change the international settings. LOCALE can also be used to set individual entries. International support is dependent on support in the File Driver (generally for the OEM attribute); consult the File Driver documentation for information on international support in specific drivers.

The following settings must be consistent:

·Default character set (charset): SYSTEM{PROP:CharSet} or the value of the CLASYSTEMCHARSET setting in the program's ENV file (see below).

·The charset parameter of the FONT set to a control or Window

·The system locale setting in the Regional and Language Options in the Windows Control Panel, e.g., the code page used by Windows for ANSI<;→UNICODE strings conversion by default.

·The environment file (.ENV) needs to be set to use ASCII encoding.

The default language for non-Unicode programs needs to be set correctly. See the following topic for details on how to setup your machine:

Setting the Language for non-Unicode programs to your native language

blk2blue.jpg

Settings available in an environment file:

CLACODEPAGE = codepage numeric value
 

CLALCID = LCID numeric value


The settings below are retained for backward compatibility, however as of version 11 we recommend you set the codepage and locale ID (LCID) using one of the 3 supported methods. See the topic internationalization.

CLADOW

To set the list of abbreviations of days of the week

for example:  LOCALE ('CLADOW', 'пн,вт,ср,чт,пт,сб,вс')

CLADOWNAME: to set the list of names of days of week

CLASYSTEMCHARSET=WINDOWS

or

CLASYSTEMCHARSET=“charset numeric value”


CLASYSTEMCHARSET specifies the value of the system charset. If CLASYSTEMCHARSET is not set or it is set to WINDOWS, the system charset is equivalent to CHARSET:ANSI. Setting this in the .ENV file is equivalent to setting the SYSTEM{PROP:CharSet} property in your program.

If you are setting PROP:CharSet in your program, you can use the following syntax:

SYSTEM{PROP:CharSet} = CHARSET:GREEK

However the ENV file does not support constants (such as CHARSET:GREEK). In an ENV file you must use the numeric value instead of the string constant, as in:

CLASYSTEMCHARSET = 161

For a list of Character Sets numeric values, see the PROP:CharSet Help topic.


blk2blue.jpg

CLACHARSET=WINDOWS

CLACHARSET=OEM


This determines the character set used by the entries in the .ENV file. WINDOWS is the default if this setting is omitted from the environment file. This should always be the first setting in the environment file.


blk2blue.jpg

CLACOLSEQ=WINDOWS

CLACOLSEQ=“string

Specifies a specific collating sequence for use at run-time. This collating sequence is used for building KEY and INDEX files, as well as for sorting QUEUEs and all string/character comparisons.

If the WINDOWS setting is used, then the default collation sequence is defined by Windows' Country setting (in the Control Panel). If this entry is omitted from the environment file, then the default ANSI ordering is used, not the windows default.


Using the WINDOWS setting, the ordering can 'interleave' characters of differing case (AaBbCc …), so code such as:

CASE SomeString[1]

OF 'A' TO 'Z'


includes 'b' TO 'z' as well. Use the ISUPPER and ISLOWER procedures in preference to this kind of code if WINDOWS (or other non-default) collation sequences are used.


In addition to the WINDOWS setting, you may specify a string of characters (in double quotes) to explicitly define the collation sequence to use. Only those characters that need to have their sort order specified need be included; all other characters not listed remain in their same relative order. For example, if CLACOLSEQ=“CA” is specified for the standard English sort (ABCD …) the resulting sort order is “CBAD.”
 
NOTE: You should always read and write data files using the same collation sequence. Using a different sequence may result in keys becoming out of order and records becoming inaccessible. Specifying CLACOLSEQ=WINDOWS means that the collation sequence may change if the user changes the Country in Windows' Control Panel. If the collation sequence changes, use BUILD to rebuild the keys in your data files.

blk2blue.jpg

CLALAYOUT=“0”,”1”

A byte value that designates whether the orientation of window controls and field sequence is set to Default, Left to Right, or Right to Left.

A style of (1) essentially “flips” the window controls' display as a mirror image of the layout specified in the Window Formatter. Default field navigation moves from right to left.

A style of (0) maintains the original layout specified in the Window Formatter. Default field navigation moves from left to right.

No style “CLALAYOUT=” uses the Window default orientation.


blk2blue.jpg

CLAAMPM=WINDOWS

CLAAMPM=“AMstring”,“PMstring

This specifies the text used to indicate AM or PM as a part of a time display field. The WINDOWS setting specifies use of the AM/PM strings set up in the Windows Control Panel. The AMstring and PMstring settings are the same as in Clarion for DOS, except that they take notice of the setting of CLACHARSET.


blk2blue.jpg

CLAMONTH=“Month1”,”Month2”, … ,“Month12”

Specifies the text returned by procedures and picture formats involving the month full name.


blk2blue.jpg

CLAMON=“AbbrevMonth1”,“AbbrevMonth2”, … ,“AbbrevMonth12”

Specifies the text returned by procedures and picture formats involving the abbreviated month name.


blk2blue.jpg

CLADIGRAPH=“DigraphChar1Char2, … “

This allows Digraph characters to collate correctly. A Digraph is a single logical character that is a combination of two characters (Char1 and Char2). The Digraph is collated as the two characters that combine to create it. They are more common in non-English languages. For example, with CLADIGRAPH=“ÆAe,æae” specified, the word “Jæger” sorts before “Jager” (since “Jae” comes before “Jag”).

Multiple DigraphChar1Char2 combinations may be defined, separated by commas. This setting takes notice of the CLACHARSET setting.


blk2blue.jpg

CLACASE=WINDOWS

CLACASE=“UpperString”,”LowerString

Allows you to specify upper and lower case letter pairs.

The WINDOWS setting uses the default upper/lower case pair sets as defined by the Windows Country setting (in the Control Panel). If this entry is omitted from the environment file, then the default ANSI ordering is used, not the windows default.

The UpperString and LowerString parameters specify a set of uppercase characters and each one's lowercase equivalent. The length of the UpperString and LowerString parameters must be equal. CLACASE takes notice of the setting of CLACHARSET. ANSI characters less than 127 are not affected.


blk2blue.jpg

CLABUTTON=“OK”,”&amp;Yes”,“&amp;No”,“&amp;Abort”,“&amp;Retry”,“&amp;Ignore”,Cancel“,”&amp;Help“

This defines the text used by the buttons of the MESSAGE procedure. The text is specified as a list of comma separated strings in the following order: OK, YES, NO, ABORT, RETRY, IGNORE, CANCEL, HELP. The default is as specified above.


blk2blue.jpg

CLAMSGerrornumber=“ErrorMessage

This allows run-time error messages to be overridden with translated strings. The errornumber is a standard Clarion error code number appended to CLAMSG. ErrorMessage is the string value used to replace that error number's default message. For example, CLAMSG2=“No File Found” makes “No File Found” the return value of the ERROR() procedure when ERRORCODE() = 2.


blk2blue.jpg

CLALFN=OFF

This disables use of long filenames in the program.


See Also:

LOCALE

Setting the Language for non-Unicode programs to your native language

Example of ENV settings

PROP:CharSet

env_file.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1