(name)
| 1856 | } |
| 1857 | |
| 1858 | function loadLocale(name) { |
| 1859 | var oldLocale = null; |
| 1860 | // TODO: Find a better way to register and load all the locales in Node |
| 1861 | if (!locales[name] && typeof module !== 'undefined' && |
| 1862 | module && module.exports) { |
| 1863 | try { |
| 1864 | oldLocale = globalLocale._abbr; |
| 1865 | require('./locale/' + name); |
| 1866 | // because defineLocale currently also sets the global locale, we |
| 1867 | // want to undo that for lazy loaded locales |
| 1868 | locale_locales__getSetGlobalLocale(oldLocale); |
| 1869 | } catch (e) { } |
| 1870 | } |
| 1871 | return locales[name]; |
| 1872 | } |
| 1873 | |
| 1874 | // This function will load locale and then set the global locale. If |
| 1875 | // no arguments are passed in, it will simply return the current global |
no test coverage detected