Skip to content

24 ways to impress your friends

Vote up?

Matthew

James: Sure; as I use gettext, I found it easiest for my JavaScript to behave similarly to and be more integrated with that, but as you say, token mapping would be possible too.

Rory: Thanks :-) I’d use “%2$s” as that’s what most other sprintf() functions use. As I – sorry, Rudolph – says, there are quite a few fuller JavaScript sprintf() functions on the internet – e.g. Ash Searle’s and alexei’s both include argument reordering.