Lines Matching refs:locale
8 this.locale = opts.locale || 'en';
23 if (!this.cache[this.locale])
26 if (!this.cache[this.locale][str] && this.updateFiles) {
27 this.cache[this.locale][str] = str;
33 locale: this.locale, property
40 return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args));
50 if (!this.cache[this.locale])
53 if (this.cache[this.locale][singular]) {
54 const entry = this.cache[this.locale][singular];
58 if (!this.cache[this.locale][singular] && this.updateFiles) {
59 this.cache[this.locale][singular] = {
68 locale: this.locale, property
82 setLocale(locale) { argument
83 this.locale = locale;
86 return this.locale;
89 if (!this.cache[this.locale])
93 this.cache[this.locale][key] = obj[key];
118 const locale = work.locale;
120 const languageFile = this._resolveLocaleFile(directory, locale);
121 const serializedLocale = JSON.stringify(this.cache[locale], null, 2);
131 const languageFile = this._resolveLocaleFile(this.directory, this.locale);
147 this.cache[this.locale] = localeLookup;
149 _resolveLocaleFile(directory, locale) { argument
150 let file = shim.resolve(directory, './', locale + '.json');
151 if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) {
153 const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json');
172 locale: y18n.locale