Skip to content

getCatalog return only a part of the locales #522

@SimoneMSR

Description

@SimoneMSR

My installation work perfectly, but when I try to get all the translations with getCatalog I get only the current locale translations.

const i18n = new I18n({
  locales: ["en-US", "it-IT"],
  directory: path.join(__dirname, "i18n"),
  header: "ignore-this",
  defaultLocale: "en-US"
})
....
this.expressApp.use(i18n.init)
this.expressApp.use((req, res, next) => {
  res.setLocale(i18n.getLocale())
  next()
})
....
i18n.getCatalog() // return only the content of .json file for current locale

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions