Live data from Hacker News

Write JavaScript in your Local Language

fhtr.org

1–10 of 29 posts

Re: Write JavaScript in your Local Language

#2
Bad idea. It's bad for collaboration and it looks comic (especially when you need to use words like "HTTP", "POST" near with local language words). We in Russia have already good example of software written in "local language" - "1S". For developers in Russia it's reference of code smell.

Re: Write JavaScript in your Local Language

#4
JavaScript? Are you sure?

    "extends": "erweitert",
    "abstract": "abstrakt",
    "volatile": "volatil",
    "interface": "schnittstelle",
    "protected": "geschützt",
    "transient": "transient",
    "implements": "implementiert",
    "synchronized": "synchronisiert",

Re: Write JavaScript in your Local Language

#5
I think this could actually be very interesting, especially for teaching children programming in non-native english speaking countries. Wouldn't it be cool if kahn academy adopted this for compsci stuff so teachers could use it in elementary? Any thoughts about making this require compliant?

Re: Write JavaScript in your Local Language

#6
post #4

JavaScript? Are you sure? "extends": "erweitert", "abstract": "abstrakt", "volatile": "volatil", "interface": "schnittstelle", "protected": "geschützt", "transient": "transient", "implements": "implementiert", "synchronized": "synchronisiert",

Some of those are reserved words in JavaScript (https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...). I'm not sure why the others are there.

Re: Write JavaScript in your Local Language

#7
This gives me nightmares of the time I was hired on contract to update a bunch of Word95 macros to manage the ISO9001 quality handbook for an international company. Thing is, Word95 could (or always did?) localize the BASIC keywords at least for some countries (no idea when/if that stopped - I have thankfully not needed that particular skill again..) and stored the scripts tokenized. Which was usually not a big problem - few people transferred scripts between localized versions.

Except these macros had been transferred from the Danish version of Word to the Norwegian version. A reasonable percentage of the code had been moved over in ways that made Word treat it as text, instead of tokenized BASIC, and consequently the translation wasnæt made. As a result, they had a ton of Danish keywords in the Norwegian codebase.

Yay. Now, it isn't the worst combination - the two languages are very similar. On the other hand this meant that a lot of things seemed plausible to me in Norwegian, yet still broke horribly because they had sometimes chosen different words that were both valid in either language...

Re: Write JavaScript in your Local Language

#8
post #3

How does this handle reserved keywords? An acceptable variable name in English might be a reserved word in Finnish.

My understanding is that this is all about reserved words. It is a reverse mapping of (English) javascript reserved words from their non-English translations.

Re: Write JavaScript in your Local Language

#9
post #2

Bad idea. It's bad for collaboration and it looks comic (especially when you need to use words like "HTTP", "POST" near with local language words). We in Russia have already good example of software written in "local language" - "1S". For developers in Russia it's reference of code smell.

Yep. And programming languages, while they use English keywords, are not English. They are languages in their own right, and "translating" words is not a good idea, because that's creating a new language.

Re: Write JavaScript in your Local Language

#10
Nice work! I could certainly see how it could lower the barrier to entry for non-English speakers when trying to learn programming. My brother-in-law, for example, has been having a hard time with English but could probably pick up Javascript faster if he could use something like this.

Something else that would be useful for him would be a simplified translation dict that only contained jquery functions. Something like http://www.jsrosettastone.com/ but for other spoken languages.

Use case would be quick reference: he sees node.append(...) somewhere but doesn't know what append means so quickly looks it up.

Edit: it's easy to find ways in which something won't work. In the spirit of the recent discussions regarding being positive on HN, let's look for ways things like this can be beneficial.

Post reply on HN