Easy Code version 1.04.0.0001
and later take
advantage of Unicode text strings and allows you to work with
practically all
languages (see Multilanguage
support). Language
files must have the lge
extension and they must be found in the Language
subfolder of the Easy Code main folder. All .lge
files being there will be
listed in the Settings
window so that you can choose the
one you wish for Easy Code. When running on Wndows 95/98/ME, languages
having
more than one byte per character will not be shown in the available
languages list
as they cannot be properly displayed.
A language file must be in Unicode
format (2 bytes per character)
and looks like this:
;--------------------------------------------------------------------------------------------------------
Lang=English (International) ; Author: Ramon Sala (asm@easycode.cat)
;--------------------------------------------------------------------------------------------------------
[Strings]
10000=Visual interface development environment
10001=Acc&elerator:
10002=Enable synta&x highlighting
10003=&Add
...
...
Language files have to follow a few rules in order to work properly:
1 - All comments must be preceeded by a semicolon (";")
2 - You can add as many comments as you like before
the [Strings]
keyword.
3 - The Lang
keyword must exist (before the [Strings]
keyword) and
specifies the language name, i.e. English
(United Kingdom).
4 - The [Strings]
keyword must exist and specifies the begining of text strings.
5 - Each text string must be preceeded by the
number which identifies the string and the "="
separator.
6 - There must not be anything else than text
strings after
the [Strings]
keyword.
When choosing a language in the Settings
window, the text after
the Lang
keyword, and before the semicolon, will be the one being shown as the
chosen language, and the text strings (in the [Strings]
section) will be the ones being used by
Easy Code. So, to make a new language file, i.e. french, we open the ECEngIN.lge
file with "Notepad"
and do the following:
1 - Change the language name and author (note the
semicolon separating the author's name and email):
;--------------------------------------------------------------------------------------------------------
Lang=Français
(France) ;
Author: Name
Surname (email@address)
;--------------------------------------------------------------------------------------------------------
2 - Translate all text strings to the new language
without modifying the string number and
taking into account a few considerations
commented below.
3 - Save the modified file (as UNICODE
text) using a different name
(see LANGUAGE
FILE NAMES)
and place it
in the Easy Code's Language
subfolder.
An ampersand ("&")
specifies that the character immediately
after it will be shown underlined. As text is translated, you can
modify the
ampersands position according to the translation, but only for those
strings
which originally had one. That is, you should not include an
ampersand in a string that did not have one in the original file.
Character combinations consisting of a backslash ("\")
followed by
a letter or the zero number are called “escape
sequences”. For example, to specify a backslash
you must type it twice ("\\"),
like you would do in C language. Easy Code only recognizes the
following escape sequences (letters must be lower case):
\0 NULL
(UNICODE character 0). Note the "0"
number after the backslash,
not the upper "O"
letter.
\a Alert
(UNICODE character 7)
\b Backspace
(UNICODE character 8)
\f Form
feed (UNICODE character 12)
\n Line
feed (UNICODE character 10)
\r Carriage
return (UNICODE character 13)
\t Horizontal
tab (UNICODE character 9)
\v Vertical
tab (UNICODE character 11)
\" Double
quotation mark (UNICODE character 34)
\' Single
quotation mark (UNICODE character 39)
\? Literal
question mark (UNICODE character 63)
\\ Backslash
(UNICODE character 92)
Please take care to translate text strings respecting all blanks,
escape sequences and those
characters not being letters, without modifying the string number nor
the "="
separator.
Otherwise, Easy Code could display wrong messages or even behave in a
strange way. If one or more
text strings are missing, the default language (english) will be loaded.
Any name may be valid
for a language file if it has the "lge"
extension and it is less or equal than 30 characters long, although it
should fit the following
convention:
- The first two characters indentify the
application using the
file (EC
for Easy Code).
- Next three characters for the language name (Eng
for english,
Esp
for spanish, etc.).
- Two (or three) final characters for the country
or
region name (UK
for United Kingdom, US
for United States, etc.).
- Finally, the ".lge"
extension in order to be a valid language file.
- Also, remeber that the file must be saved in UNICODE
format.
So, for a file translated to french for France, the appropiated name
would be
ECFraFR.lge,
while ECFraCA.lge
would mean french for Canada.
REMARKS:
Easy Code is distributed with a few language files that I personally
translated. Please forgive me if you find any error, or an inappropiate
syntax, and report
it to me so that I can modify it immediately. That way, it will be
ready for next versions
of Easy Code.
IMPORTANT:
Language files must be saved in UNICODE
format (UTF-16)
using 16 bits per
character (not "UTF-8" nor "Unicode
big endian"), otherwise they will not work.
You can use the "Notepad"
application (just Windows NT and later) and save the language files as
Unicode text.
NOTE:
If you translate a file to any other language, please send it to me. I
will be pleased
to include it in next versions of Easy Code.