Comments (5)
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.
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.
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.
@iamgergo ,
Hi, Did you get a chance to look into this?
from i18n.
@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)
- trim whitespaces HOT 1
- Translation string with more than two options HOT 3
- Only one package added to the list of translations HOT 3
- How to update the translation after making changes in laravel lang directory ? HOT 1
- Directive is cached in a development environment HOT 1
- Filtering support HOT 3
- Local package commands not found HOT 3
- Laravel 8 support HOT 1
- Translations directive not working in live server
- Translations from JSON files are not working
- trans() function always returns default language
- Laravel 9 compatibility HOT 5
- JS implementation of trans_choice doesn't match PHP implementation HOT 1
- Laravel 10 support HOT 2
- Caching of translation strings isn't possible when embedding them in the html. HOT 6
- Select specific files HOT 1
- The package does not support multi-lang apps HOT 3
- Maybe not all browsers support ES2018 new RegExp Features HOT 1
- Translations can not be updated in view HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18n.