Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localized strings with a dot in their name are unrenderable #115

Closed
ERPedersen opened this issue Oct 15, 2017 · 6 comments
Closed

Localized strings with a dot in their name are unrenderable #115

ERPedersen opened this issue Oct 15, 2017 · 6 comments
Labels

Comments

@ERPedersen
Copy link

ERPedersen commented Oct 15, 2017

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

@rmariuzzo
Copy link
Owner

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.

@ERPedersen
Copy link
Author

Awesome. Thanks for your feedback :)

@rmariuzzo
Copy link
Owner

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

@ERPedersen
Copy link
Author

Any progress on this yet?

@rmariuzzo
Copy link
Owner

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

@catlabs
Copy link

catlabs commented Dec 1, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants