MCPcopy Create free account
hub / github.com/DTStack/molecule / initialize

Method initialize

src/i18n/localeService.ts:97–104  ·  view source on GitHub ↗
(locales: ILocale[], localeId: string)

Source from the content-addressed store, hash-verified

95 }
96
97 public initialize(locales: ILocale[], localeId: string) {
98 this.addLocales(locales);
99 if (this._locales.get(localeId)) {
100 this._current = this._locales.get(localeId);
101 } else {
102 logger.error(`Cannot initialize the locale with ${localeId}`);
103 }
104 }
105
106 public getCurrentLocale(): ILocale | undefined {
107 return this._current && Object.assign({}, this._current);

Callers

nothing calls this directly

Calls 2

addLocalesMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected