rhombus-prototype icon indicating copy to clipboard operation
rhombus-prototype copied to clipboard

Make RFC on internationalising racket2

Open spdegabrielle opened this issue 5 years ago • 8 comments

Like string-constants-lib String constants support internationalisation via translation files so DrRacket UI can be used in a range of languages, but applied to the code. https://en.m.wikipedia.org/wiki/Non-English-based_programming_languages

spdegabrielle avatar Jul 19 '19 19:07 spdegabrielle

Of course this makes the DrRacket "Determine language from source" weird.

spdegabrielle avatar Jul 19 '19 19:07 spdegabrielle

I mean, the grammar of Racket is really:

#lang <id>
<whatever>

Is #lang and <id> supposed to be i18n-able?

sorawee avatar Jul 19 '19 19:07 sorawee

@sorawee yes and also right to left like Arabic

لغة مضرب# (Just a guess

spdegabrielle avatar Jul 19 '19 21:07 spdegabrielle

#lang is very difficult to internationalize, but you can use #! instead.

gus-massa avatar Jul 19 '19 22:07 gus-massa

@gus-massa what makes it difficult?

spdegabrielle avatar Jul 20 '19 00:07 spdegabrielle

I think that two productive things in this realm would be (1) integrating a notion of language into Scribble and (2) moving from exceptions that just strings to a huge number of Java-style exceptions with all the fields. The best example of this second point is the contract system. It has a huge amount of interesting information embedded in the string representation of the error.

jeapostrophe avatar Jul 21 '19 01:07 jeapostrophe

Related work: the javascript package cacache on npm has multiple localized APIs, with the documentation and the library's exported identifiers available in both English and Spanish. I would be very happy to see something similar in the Racket world.

jackfirth avatar Jul 21 '19 02:07 jackfirth

Changes to infrastructure must be made to support easy creation and integration of translations. Documentations, main site, etc.

Another place is tools, like raco for example.

Nyanraltotlapun avatar Aug 12 '19 08:08 Nyanraltotlapun