1 | ;
|
2 | /**
|
3 | * Created by hustcc on 18/5/20.
|
4 | * Contract: i@hust.cc
|
5 | */
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | /**
|
8 | * All supported locales
|
9 | */
|
10 | var Locales = {};
|
11 | /**
|
12 | * register a locale
|
13 | * @param locale
|
14 | * @param func
|
15 | */
|
16 | exports.register = function (locale, func) {
|
17 | Locales[locale] = func;
|
18 | };
|
19 | /**
|
20 | * get a locale, default is en_US
|
21 | * @param locale
|
22 | * @returns {*}
|
23 | */
|
24 | exports.getLocale = function (locale) {
|
25 | return Locales[locale] || Locales['en_US'];
|
26 | };
|
27 | //# sourceMappingURL=register.js.map |
\ | No newline at end of file |