Giter VIP home page Giter VIP logo

Comments (5)

iamgergo avatar iamgergo commented on August 23, 2024

Hi,

Can you provide a concrete example, please? It would be a big help if I could understand a bit more!

Thank you!

from i18n.

aGirish-csq avatar aGirish-csq commented on August 23, 2024

I have all the strings/keys to be localized in messages.php under en folder. I have another locale 'fr' under which I have messages file, but it does not have all the strings which are available in en/messages.
When I change the locale to 'fr' in the frontend/view, and try to fetch some of the missing strings in javascript file, it is showing 'null' instead of fetching from the en/messages file.
Eg: I am using trans('messages.someString') to fetch the localized string.

Is there any additional setting I need to do to make this work?

from i18n.

iamgergo avatar iamgergo commented on August 23, 2024

I see! I'll take a look and let you know!
It should not have this issue, but it's possible that I missed something.

Thanks for your help!

from i18n.

aGirish-csq avatar aGirish-csq commented on August 23, 2024

@iamgergo ,
Hi, Did you get a chance to look into this?

from i18n.

iamgergo avatar iamgergo commented on August 23, 2024

@aGirish-csq Hi,

So, the problem here is that, we don't compare the current language with the fallback language if is there any translation that is present in the fallback translation but not present in the current one.

Maybe in the future I'll add a solution that merges the missing translations from the fallback locale, but for now it's faster and easier to just add the missing keys to your french translations.

Thank you!

from i18n.

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.