mozilla

Revision 235295 of Template:MDN:Common

  • Revision slug: Template:MDN:Common
  • Revision title: Template:MDN:Common
  • Revision id: 235295
  • Created:
  • Creator: lmorchard
  • Is current revision? No
  • Comment

Revision Content

<% module.exports = { localString: function (strings, default) { var lang = env.locale; if (!(lang in strings)) { lang = 'en-US'; } if (!(lang in strings)) { return default; } return strings[lang]; } } %>

Revision Source

<% module.exports = {
    
    localString: function (strings, default) {
        var lang = env.locale;
        if (!(lang in strings)) { lang = 'en-US'; }
        if (!(lang in strings)) { return default; }
        return strings[lang];        
    }
    
} %>