you can use navigator.mozL10n.localize instead. see https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/thread_ui.js#L491-L493for example.