JSON Localization Hello Good people,
It's possible to create nested localization JSON?
If yes, how I can access to this from blade template?
{
"errors": {
"auth.failed": "Wrong data",
"auth.throttle": "Need to wait :seconds seconds"
}
}
you have to use multidimensional array as per your requirement and then convert them into json format
But original file is resources/lang/*.json and I can't use typical arrays.
Maybe it's possible to split file to section like VIEWS?
sorry but didn't get you??
I'm simple man. Sorry I don't get it. Maybe I will try to explain more my problem. Here's a little bit of imaginary code:
*.json
{
"users": {
"Login":"Login",
"Address Email":"E-mail"
},
"login": {
"Login":"Sign In",
"Address Email":"Email"
}
users.blade.php
{{ __('Login) }} //gives Login
login.blade.php
{{ __('Login) }} //gives Sign In
Sometimes I need to use the same string, but in different page it has different meaning. If this question is too obvious, then I apologize. I just try to find solution.
Please sign in or create an account to participate in this conversation.