Skip to content

Not able to get MultiloadAdapter, HttpBackend, and FSBackend working together #2205

Closed Answered by adrai
yaman3bd asked this question in Q&A
Discussion options

You must be logged in to vote

ok, a config like this should work: https://github.com/i18next/i18next-multiload-backend-adapter/blob/master/examples/caching/app.js#L38

This means your config would probably look like this:

module.exports = {
    i18n: {
        locales: ["en"],
        defaultLocale: "en"
    },
    use: [ChainedBackend],
    ns: ["auth", "otp", "common", "validation"],
    preload: ["en"],
    defaultNS: "common",
    backend: {
        backends: [
          FSBackend,
          MultiLoadBackendAdapter
        ],
        backendOptions: [{ // options for fs backend
          loadPath: './locales_cache/{{lng}}/{{ns}}.json',
          addPath: './locales_cache/{{lng}}/{{ns}}.json',
          expirationTime

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@yaman3bd
Comment options

@adrai
Comment options

Answer selected by yaman3bd
@yaman3bd
Comment options

@adrai
Comment options

@yaman3bd
Comment options

@adrai
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants