From: farhad on
Is it possible to change the English interface of a software to
another language say Korean.
From: Pascal J. Bourguignon on
farhad <f_esfandiari(a)yahoo.com> writes:

> Is it possible to change the English interface of a software to
> another language say Korean.

Yes.

It might be more or less complex and costly, but of course, in software,
anything is possible.

In the very worse case, you can put on a face that translates it.

--
__Pascal Bourguignon__
From: Rui Maciel on
farhad wrote:

> Is it possible to change the English interface of a software to
> another language say Korean.

Some APIs offer nifty internationalization support which is a pleasure to work with. Take,
for example, Qt[¹]. Basically you just pass all the text strings you wish to show the user
through a translation function (i.e., instead of "foo" just write tr("foo") ) and fill in a
translation file where you map those strings to their equivalent in some other language.
Having done that, the API will take care of the rest.


Rui Maciel

[¹] http://doc.trolltech.com/4.6/internationalization.html
From: Michael Angelo Ravera on
On Mar 26, 4:20 pm, farhad <f_esfandi...(a)yahoo.com> wrote:
> Is it possible to change the English interface of a software to
> another language say Korean.

Of course it is possible, but the usual method is to create a
preprocessor. Since it is impolite to use KSC or JISCII in newsgroup
posts, I will illustrate using romanized equivalents.

Let's imagine that you were doing something like FORTRAN (to give an
example that easily illustrates the point)

We could image Japanese code that looks like this:

SHIMASE 10,I=1,10
KAKE (61,'I2) I
10 IKIMASE

Now, imagine that the "SHIMASE", "KAKE", "IKIMASE" were actually in
JISCII.

Well, it would be a relatively simple matter to switch the JISCII
equivalents of SHIMASE to "DO", KAKE to "WRITE" and IKIMASE to
"CONTINUE" and you would come up with the following
DO 10,I=1,10
WRITE (61,'I2') I
10 CONTINUE

Your preprocessor would have to know only to alter the keywords in the
language and not to alter anything inside quotes and the like, but
that part is fairly easy.

The difficulties encountered are for constructs that would be more
naturally stated in a different word order (Fortran's syntax is
decidedly backwards, if you naturally write in Japanese or Korean). In
this case, simple substitution wouldn't suffice and your preprocessor
would have to be slightly more inteligent, but it is certainly
possible.

I WA 1 KARA 10 MADE 10 NI SHIMASE
61 NI 'I2' DE I WO KAKE
10 IKIMASE

Would be far more natural Japanese and starts to look like COBOL. it
wouldn't be any great trick to turn this into good Fortran. You could
probably turn it into pretty good C as well.

Now, if you were just looking simply to translate menus, etc, It
depends upon how generic the interface was in the beginning. If it is
frequently a lot of HTML forms for gathering input and a lot of
showing of forms and lists for output, your translations can be
extrinsic to the program. If you use a lot of lanuage specific prompts
and the like that you don't look up, you will have to take a major
look at every human input and output step.

If you create a program that you intend to localize or
internationalize, my suggestion is that you do not use your language's
equivalent of the common printf function. You should look up the
format and it should be able to change the order in which the
arguments are to be shown. The Unix version of printf may allow this.
Some others do not.

Even if you have a printf that allows reordering of the output fields,
you should always look up the format (resources, auxiliary file,
whatever). You can do this either on demand, cached, or at start up
depending up the volatility of the program, the frequency of the use
of the formats and the number of them.

If you don't have a printf that allows reordering, you need to create
a function that takes formats like this:
ListStatsMsgFmt = "$1%06.6d records returned in $2%8.2f seconds\n"
to be turned into
ListStatsMsgFmt = "It took $2%8.2f seconds to return $1%06.6d rows\n"
or
ListStatsMsgFmt = "Rows examined: $3%d\nElapsed Time: $2%8.2f
seconds\nRows Returned $1%06.6d\n"


So now you just call
reorderableprintf (ListStatsMsgFmt, nRowCount, fElapsedTime,
nFalseDrops);

.... and you don't care if the text is in Japanese, Hebrew, or
Titanian.