dgkf / dgkf/R

Keyword localization

Open
#55 2 comments 0 reactions 0 assignees View on GitHub
meta-localization theme-internals type-design
Dominant language
Rust
Stars
145
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I'll preface this by saying I'm a native english speaker and have never lived through the experience of trying to program in a language that assumes anything but english fluency. I'm certainly not the right person to plan such a feature, but I want to float the idea in case any non-native english speakers want to weigh in on opportunities for improvement on english-first languages and how they might be addressed.

The [history of localized languages](https://en.wikipedia.org/wiki/Non-English-based_programming_languages) seems to indicate that there is at least some interest for this, and I'm very interested in experiments for a more native implementation. I'd like to explore translations early so that they're a central feature of the language.

Although I think it's important that there is an assumed language for the portability of code, there could certainly be a way to opt-in to swap out the grammar's keywords and condition message translations. The idea is that a language might have alternative language modes (`r --lang=es`) that would allow for localized keywords:

```r
#! usr/bin/env r # #! usr/bin/env r --lang=es
f <- function(...) { # f <- funcion(...) {
if (TRUE) { # si (CIERTO) {
} else { # } sino {
} # }
} # }
```

(apologies to any spanish speakers if this isn't a sensible translation!)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.