static loadLocales() {
    if (this.locales !== undefined) {
      return;
    }

    this.locales = {};

    const files = fs.readdirSync(this.localizationPath);
    for (const fileName of files) {
      if (!fileName.startsWith(StringsPrefix)) {
        continue;
      }

      if (!fileName.endsWith(JsonSuffix)) {
        continue;
      }

      const localeName = fileName.slice(StringsPrefix.length, fileName.length - JsonSuffix.length);

      const filePath = path.join(this.localizationPath, fileName);

      const rawdata = fs.readFileSync(filePath, 'utf8');
      const locale = JSON.parse(rawdata);

      this.locales[localeName] = locale;
    }
  }
/**
   * Loads the locales from the file system.
   */
Loads the locales from the file system.
Loads the locales from the file system .
static loadLocales() {
    if (this.locales !== undefined) {
      return;
    }
    this.locales = {};
    const files = fs.readdirSync(this.localizationPath);
    for (const fileName of files) {
      if (!fileName.startsWith(StringsPrefix)) {
        continue;
      }
      if (!fileName.endsWith(JsonSuffix)) {
        continue;
      }
      const localeName = fileName.slice(StringsPrefix.length, fileName.length - JsonSuffix.length);
      const filePath = path.join(this.localizationPath, fileName);
      const rawdata = fs.readFileSync(filePath, 'utf8');
      const locale = JSON.parse(rawdata);
      this.locales[localeName] = locale;
    }
  }
static loadLocales ( ) { if ( this . locales !== undefined ) { return ; } this . locales = { } ; const files = fs . readdirSync ( this . localizationPath ) ; for ( const fileName of files ) { if ( ! fileName . startsWith ( StringsPrefix ) ) { continue ; } if ( ! fileName . endsWith ( JsonSuffix ) ) { continue ; } const localeName = fileName . slice ( StringsPrefix . length , fileName . length - JsonSuffix . length ) ; const filePath = path . join ( this . localizationPath , fileName ) ; const rawdata = fs . readFileSync ( filePath , 'utf8' ) ; const locale = JSON . parse ( rawdata ) ; this . locales [ localeName ] = locale ; } }
Loads the locales from the file system.
Loads the locales from the file system .