I am currently researching upon applying the DVB-MHP system, that is the
Digital Video Broadcasting - Multimedia Home Platform system. People
interested in DVB-MHP broadcasting might like to look at http://www.mhp.org
and http://forum.mhp.org and http://www.mhp-forum.de and
http://www.mhpdev.net and my own research in the area on
http://www.users.globalnet.co.uk/~ngo for further information. The DVB-MHP
system uses Java and Unicode. Java programs are broadcast upon digital
television channels.
An idea that I have initiated is that in authoring such Java programs for
broadcasting a software author may choose to have what I call a polyglot
compatibility section wherein literal strings used in the program are
defined all in one section between comments that a polyglot compatibility
section starts and that a polyglot compatibility section finishes.
The idea is explainable using an example. Suppose that a program is to run
with a screen display that would, in English, have an output that is, on
some particular occasion, "The result is 23" where the text "The result is "
is the same text every time and the number 23 is the value of an integer
which might be different each time that the program is run. A DVB-MHP
application program that uses a polyglot compatibility section would have a
string containing the text "The result is " defined within a polyglot
compatibility section, usually in the global definitions of the program, and
then that string by name would be used to produce the display from within
the body of the program, rather than use a literal value to produce the
message.
This takes longer to program, but is, I feel, worthwhile, as, suppose that
someone other than the author of the original English program wishes to
translate the program so as to produce a program which has screen output
using the French language, then all that that person needs to do, usually,
is to translate the strings within the polyglot compatibility section and
recompile and check that the output on the screen looks satisfactory. This
will be a lot easier in most cases than having to go through the program and
seek out each string that is in one language and translate it into another
language.
As my development of the concept of a polyglot compatibility section
continues I am wondering quite what happens if the language into which one
is to translate is written from right to left, or indeed, if the original
program is authored in a language that has a screen display that is in a
language that runs from right to left and one wishes to translate it to have
a screen display that runs from left to right.
I have it in mind to introduce a flag into a polyglot compatibility section
so that a program may be written so as to take the change from left to right
into right to left into account when producing a screen display. However, it
may be more complicated than that, so I need to find out the details of what
is needed.
The idea is that the author of a program which has a screen display in one
particular language may define string literals and provide such information
as direction of the script (left to right or right to left) and maybe such
things as which Unicode characters to use to express digits and a decimal
point in a polyglot compatibility section, such that another person at a
later date may produce a version of the program with a screen display in
another language solely, in most cases, by translating the text strings in
the polyglot compatibility section and altering other information in the
polyglot compatibility section as necessary and compiling the thus altered
source code of the program.
In the discussion at http://forum.mhp.org the existence of
java.util.ResourceBundle, javaListResourceBundle and java.util.Locale has
been mentioned.
I have found some documents on this from the http://java.sun.com website and
am looking at these. I wonder if this is the way to go, but as yet have not
learned enough to implement such a solution.
I wonder if readers of this list might like to discuss the matter please.
William Overington
28 August 2001
This archive was generated by hypermail 2.1.2 : Tue Aug 28 2001 - 04:30:50 EDT