Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

View: New views
9 Messages — Rating Filter:   Alert me  

Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Rüdiger Müller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guten Tag,

Inwieweit beherrscht der G-C-Übersetzer Unicode? Umlaute sind z.B. noch nicht gestattet?

Übersetzungsvorstellung: "Übersetzerkarteien mit z.B. den reservierten Wörtern der Programmbausprache C."

Kartei besetzte_Wörter_deutsch:
1 Falls
2 Dann
3 Andernfalls
4 rückgeben

Kartei besetzte_Wörter_englisch:
1 if
2 then
3 else
4 return

Weiterhin wäre es praktisch eingebaute "Zeichensetzung", wie z.B. Ausgabe f1(Eingabe) ändern zu können, in z.B. (Eingabe)f2(Ausgabe). Das würde schon die Grammatik beeinflußen.

Wünschenswert wäre da z.B. eine Kartei: XML-Kartei Zeichensetzung_C:
<Funktion>Ausgabe Funktionsname(Eingabe)</Funktion>

änderbar z.B. in
<Funktion>(Eingabe) Funktionsname (Ausgabe)</Funktion>

.

In wie weit sind solche Ansätze (Fragestellungen) zu realisieren?
Als "Grundgerüst" könnte man doch eventuell "eindeutige" Zahlen anstatt "Ziffernfolgen" einsetzen.
Vorstellung eines Beispielprogramms:

----
Lingua=Deutsch

#Hinzufügen "Sprachen.Bauteil"

(a,b)Einsprung(c Ganzzahl){
  (1)Zahlganz(a);
  (2)Zahlganz(b);
  ("Orbitum, te salute! %d, %d",a,b)Zifferausgabe();
  /////Ausgabe soll sein: " Orbitum, te salute! 1, 2 "
  (a)Ausgeben;
  }
----

Mit wieviel Aufwand könnte man den "G-C-Übersetzer" dementsprechend anpassen?

Vorschlag für Lokalisierung einer Funktion.

int Nachricht_senden(a,b,c)

///Übersetzer_Funktion(Nachricht_senden, Übersetzung: "Scribus emittere".)

In etwa war das die Zielbeschreibung:

1. Reservierte Wörter lokalisieren.
2. Lokalisierung von Funktionsnamen, Parametern, und Variablen (z.B. im Funktionskontext.)
3. Flexible Einstellung der Bedeutungsziffern. (Also statt f1(), auch ()f1 möglich.)

Wer hat Erfahrung mit diesem Thema?

Wer kann dabei helfen, die Zielsetzung ins Englische zu übersetzen?

M.f.G.

R. Müller
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220


RE: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Dave Korn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rüdiger Müller wrote on 06 October 2008 17:55:

  God no.  Think of the maintenance nightmare.

  You're not the first person to come up with this idea, and you probably
won't be the last, but it's a misbegotten idea, and there's a very good reason
why it hasn't been done before, and that's not just "because nobody's thought
of it before you", but because it would basically destroy the software
industry.  Which is on shaky enough ground already as it is (c.f. "The crisis
in software engineering"), the last thing we need is yet another degree of
inordinate complexity...


    cheers,
      DaveK
--
Can't think of a witty .sigline today....


Re: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Kai Henningsen-13 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 6 Oct 2008 18:42:17 +0100
"Dave Korn" <dave.korn@...> wrote:

> Rüdiger Müller wrote on 06 October 2008 17:55:
>
>   God no.  Think of the maintenance nightmare.
>
>   You're not the first person to come up with this idea, and you
> probably won't be the last, but it's a misbegotten idea, and there's

In fact, I believe it came up around the time when COBOL was invented.
And you'll notice that it didn't get implemented back then, even though
people thought it wouldn't be all that hard to do.

> a very good reason why it hasn't been done before, and that's not

Actually, that's not true.

In my Apple ][+ days, I've seen it done with BASIC. For some reason, it
never amounted to more than a toy.

I'm sure someone somewhere is doing it to a programming language right
now. Poor language.

Re: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Joe Buck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rüdiger Müller wrote on 06 October 2008 17:55:

[ proposal to localize keywords: replace if/else/return etc with
  equivalents from the local language ]

On Mon, Oct 06, 2008 at 06:42:17PM +0100, Dave Korn wrote:
>   God no.  Think of the maintenance nightmare.

I guess it's easy for native English speakers like Dave and me to object
(and be thankful that we didn't live 80 years ago, when the leading
physics and engineering journals were in German).  Still, Dave's right.

A reserved word is in essence a symbol, even if it takes the form of
a word from a particular language.  Now that we have Unicode, I suppose
one could come up with programming languages that use
spoken-language-neutral symbols in place of reserved words.  C already
does this to some extent: { and } instead of "begin" and "end", && and
|| instead of "and" and "or".  That would be preferable to making
every equivalent word in every language a keyword, or requiring the
setting of a "programmer spoken language" variable that would have to
be set correctly to compile a program.

Determined users are still free to write

#define falls if

and the like, though I would have thought "wenn" would be more correct in
conveying the sense in which "if" is used in C (though my German is very
limited).  Unfortunately, #define itself can't be replaced.




Re: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Andreas Schwab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Joe Buck <Joe.Buck@...> writes:

> Unfortunately, #define itself can't be replaced.

That was really a step backward.  It caused some of the early IOCCC
entries to no longer work.

Andreas. :-)

--
Andreas Schwab, SuSE Labs, schwab@...
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

[OT] RE: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Dave Korn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Tagged OT, because I guess we are getting to be, and I won't prolong this
thread unduly.]

Joe Buck wrote on 06 October 2008 19:11:

> Rüdiger Müller wrote on 06 October 2008 17:55:
>
> [ proposal to localize keywords: replace if/else/return etc with
>   equivalents from the local language ]
>
> On Mon, Oct 06, 2008 at 06:42:17PM +0100, Dave Korn wrote:
>>   God no.  Think of the maintenance nightmare.
>
> I guess it's easy for native English speakers like Dave and me to object
> (and be thankful that we didn't live 80 years ago, when the leading
> physics and engineering journals were in German).
>
> A reserved word is in essence a symbol

  <shrugs>  I don't really think the use of native language words even gives
all that much of a comprehension advantage, even to fairly beginning
programmers.  Like you say, it's a fairly arbitrary symbol; if people are
capable of learning A/PL, then they probably wouldn't find it all that hard to
learn any arbitrary symbol's relationship to an operation.

> Determined users are still free to write
>
> #define falls if
>
> and the like, though I would have thought "wenn" would be more correct in
> conveying the sense in which "if" is used in C (though my German is very
> limited).

  And that's the essence of the problem.  You can't translate word-by-word and
still get meaningful sentences out.  Even in the mainstream European languages
there are enough differences in contextual semantics and just plain old
word-order that it wouldn't really end up being a very meaningful translation
technique; to a native speaker most code would just end up looking like
gibberish.


    cheers,
      DaveK
--
Can't think of a witty .sigline today....


Re: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Florian Weimer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Dave Korn:

>   You're not the first person to come up with this idea, and you probably
> won't be the last, but it's a misbegotten idea, and there's a very good reason
> why it hasn't been done before, and that's not just "because nobody's thought
> of it before you", but because it would basically destroy the software
> industry.

It's still the industry standard for spreadsheet formulas.

Microsoft tried to apply this principle to programming languages in
early versions of Visual Basic For Applications.  (WordBasic had just a
localized run-time library, matching the localized menu structure.)
This turned out to be very problematic, even before the increase in
global communication across the Internet.

Re: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Nicholas Nethercote-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 6 Oct 2008, Kai Henningsen wrote:

>>   You're not the first person to come up with this idea, and you
>> probably won't be the last, but it's a misbegotten idea, and there's
>
> In fact, I believe it came up around the time when COBOL was invented.
> And you'll notice that it didn't get implemented back then, even though
> people thought it wouldn't be all that hard to do.
>
>> a very good reason why it hasn't been done before, and that's not
>
> Actually, that's not true.
>
> In my Apple ][+ days, I've seen it done with BASIC. For some reason, it
> never amounted to more than a toy.
>
> I'm sure someone somewhere is doing it to a programming language right
> now. Poor language.

Early versions of AppleScript -- a "naturalistic" language with lots of
keywords -- supported a french "dialect" and even Japanese.  See page 20 of
http://www.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf

AIUI, the foreign language support was dropped at some point.

Nick

Re: Echte Lokaliserung der Programmbausprache/ Real Localisation of Programming Language

by Andrew Pinski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 17, 2008 at 1:27 PM, Nicholas Nethercote
<njn@...> wrote:
> Early versions of AppleScript -- a "naturalistic" language with lots of
> keywords -- supported a french "dialect" and even Japanese.  See page 20 of
> http://www.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf
>
> AIUI, the foreign language support was dropped at some point.

It was still there the last time I looked about 3 years ago.  Now
AppleScript would translate the english to french too as it would use
byte code for the keywords really.

Thanks,
Andrew Pinski
LightInTheBox - Buy quality products at wholesale price!