Giter Site home page Giter Site logo

Comments (9)

manniL avatar manniL commented on July 30, 2024 3

Looks like the bug is fixed. Thank you, Paul! But there is another (rare) edge case. Will open up a new issue for it in a second

from i18n-module.

paulgv avatar paulgv commented on July 30, 2024 2

Hi guys, sorry for this frustrating issue. Hopefully it's fixed in v2.3.4.
@elpeyotl thanks for the repo, I tested it with the new version and it looks okay!

from i18n-module.

elpeyotl avatar elpeyotl commented on July 30, 2024 1

@mahmoudmy

If I change your config file like this it works. But it not asynchrous anymore.

            module.exports = {
        locales: [{
            code: 'fa',
            iso: 'fa-IR',
            name: 'فارسی',
            langFile: 'fa.js'
        }, {
            code: 'en',
            iso: 'en-US',
            name: 'English',
            langFile: 'en.js'
        }],
        defaultLocale: 'fa',
        vueI18n: {
            fallbackLocale: 'fa',
            silentTranslationWarn: true,
            messages: {
            fa: require('../locales/fa.js'),
            en: require('../locales/en.js'),
            },
        },
        }

Probably you can use that as a workaround? Dont know why on inital load the language is not loaded. I have exact the same issue.

from i18n-module.

elpeyotl avatar elpeyotl commented on July 30, 2024

Even if I run "npm run build" and then "npm run start" i see the same behaviour.

from i18n-module.

elpeyotl avatar elpeyotl commented on July 30, 2024

If load the files not asynchrously it works:

    vueI18n: {
      messages: {
       fr: require('./lang/fr-FR.json'),
      en: require('./lang/en-US.json'),
      de: require('./lang/de-DE.json')
    },

from i18n-module.

mahmoudmy avatar mahmoudmy commented on July 30, 2024

I think it's similar to my problem discussing in #23 .

from i18n-module.

elpeyotl avatar elpeyotl commented on July 30, 2024

@mahmoudmy I downloaded your repo and was running it. Could find any issue? How to you build it? I run it with npm run dev. and it was showing first page in english. when i click on house it changed to arabic.

from i18n-module.

mahmoudmy avatar mahmoudmy commented on July 30, 2024

Thanks @elpeyotl . The first page wasn't in English, it just shows the message keys (CAPITAL LETTERS) and this is the bug!

from i18n-module.

manniL avatar manniL commented on July 30, 2024

Same problem here. It works in dev mode, but not in production (npm run build && npm start)

from i18n-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.