Open lehitoskin opened 7 years ago
Standard behavior for this kind of thing:
fr_FR
or whatever to make things a little easier on themselvesI'm betting there's at least one standard/official localization library for racket already, and probably a handful of popular ones that are good quality and well-maintained by the community. On the face of it, this is a pretty simple problem that you could hack together without much effort, but it gets trickier when you have to do things like take grammatical number into account when building format strings, gender, person, case, etc. So it's probably better to use something that already exists if you can.
There is the string-constants module, but it only effects DrRacket's GUI elements, so the best we can do is copy and adapt its structure.
I fully expect there to be something comparable on github, or in the repo at https://pkgs.racket-lang.org. Just need to poke around a bit.
The more different the language is from english, the more involved localization is, if you're displaying anything other than fully static pre-translated text. If you wanted to include something like "Found %d matching files"
, some languages might have different pluralization for two files versus 3+ files.
Just something to think about.
It may at some point become desirable to create translations for many of the different menu items and such, including the help-string text. Here's how I envision this could go:
read
or some such) 1a. One file per language might be best 1b. Place them inside the ivy directoryhash-ref
for when there's things we want to translateSome concerns: