rmariuzzo / Laravel-JS-Localization

🌐 Convert your Laravel messages and consume them in the front-end!

Home Page:https://github.com/rmariuzzo/laravel-js-localization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Localized strings with a dot in their name are unrenderable

ERPedersen opened this issue · comments

strings.php

return [
    'info' => 'More info',
    'link.info' => 'Get more info',
];
Lang.get('strings.info'); // Outputs "More info"
Lang.get('strings.link.info'); // Outputs "strings.link.info"

Seems like if my strings are separated by a dot, they are unrenderable

This will be addressed at: rmariuzzo/Lang.js#54

I will keep this issue open until solved at Lang.js and pulled into this repo.

Awesome. Thanks for your feedback :)

@ERPedersen progress has been made. I'm waiting to support a tricky test, then it will be merged ASAP.

Any progress on this yet?

Sorry for the long wait @ERPedersen and all other devs. This has been published now!

Hi Rubens,

I just noticed another small issue if you are interested in fixing it :-)

layout.php

return [
    'test' => 'this is a test',
    'test.sub' => 'this is a sub test'
]
Lang.get('layout.test'); // Outputs "this is a test"
Lang.get('layout.test.sub'); // Outputs "this is a test"

This works in Laravel