simplest-i18n
Version:
The Simplest Universal i18n Solution
1 lines • 437 B
JavaScript
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.i18n=e()}(this,function(){return function(n){var e=n.locale,i=n.locales,t=i.indexOf(e);if(-1===t)throw new Error(e+" is not included in "+i);return function(){var n=[].slice.call(arguments);if(n.length!==i.length)throw new Error(n[0]+": missing translation(s) in "+i.slice(n.length));return n[t]}}});