I think it is easier to create a new localizable programming environment from scratch, than to try to localize existing tools and APIs.

For example, block-based programming languages (like Scratch and eToys) tend to be fairly easy to translate -- there are some issues regarding fixed size labels, the meaning of concatenating labels in various langauges, etc, but these programs proved surmountable.  We used these extensively at One Laptop per Child.

At OLPC I worked on a block-based JavaScript-subset, which allowed complete translation between "text based" and "block based" views of the code: http://turtlescript.github.cscott.net/
You could localize the labels in the block-based version and still "compile down" to the legacy/English APIs.

As some folks know I've been a persistent advocate for JavaScript in Scribunto, and I've contributed to v8js to this end.

Another option is to move away from textual scripting languages on wiki entirely.  For example, https://phabricator.wikimedia.org/T114454 proposes using Visual Editor to perform more of the "template" tasks, with a stronger separation of code, "layout", and data.  Template edits which affect the visual presentation or the data ("arguments") but not the underlying code should be possible in Visual Editor in a fully localized manner.  The textual "code" portion would be de-emphasized for most tasks.  For tasks which do require "code" to be written, you'd use one of the techniques described above.
  --scott