Equivalent of sprintf for il18n on Javascript
-
The best practice for internationalisation of output that includes expressions is to wrap it in sprintf. For example:
<?php $output = sprintf( // Translators: 1 = subject, 2 = adjective. __("The %s is %s.", $this->plugin_name) $subject, $object ); ?>
Is there a best practice way to do this in Javascript? I could use replace() fairly easily, but I wanted to know if there was a canonical solution.
Thanks,
Ian
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Equivalent of sprintf for il18n on Javascript’ is closed to new replies.