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

readme doc unclear or wrong on array notation for t() #12

Closed
kairos666 opened this issue Dec 30, 2020 · 1 comment
Closed

readme doc unclear or wrong on array notation for t() #12

kairos666 opened this issue Dec 30, 2020 · 1 comment

Comments

@kairos666
Copy link

Great library simple and flexible.

Small issue I've found, using the readme doc notation doesn't work for me
a string that with dot notation — 'foo.bar[1].baz'

from the tests I think the correct syntax should be 'foo.bar.1.baz'. Unless of course you can help me correct my understanding of this case.

Cheers

@lukeed
Copy link
Owner

lukeed commented Dec 30, 2020

Oh, whoops! Yes only foo.bar.1.baz notation is supported for string keys. If you want to use an array-key, you could do this too: ['foo', 'bar', 1, 'baz'] (note: 1 or '1' both work here).

@lukeed lukeed closed this as completed in 1b87b62 Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants