Closed murdockcrc closed 9 years ago
How to access text when the locale JSON file has nested text: For example: { "main-page": { "title": "This is the main title" } }
Trying to access this via I18n.__("main-page.title") returns the string "main-page.title" instead of the intended "This is the main title".
Would you mind to clarify how to access nested JSON elements within the locale file?
I'm working on a pull request for this now. Object notation certainly seems to be a fairly standard extra.
How to access text when the locale JSON file has nested text: For example: { "main-page": { "title": "This is the main title" } }
Trying to access this via I18n.__("main-page.title") returns the string "main-page.title" instead of the intended "This is the main title".
Would you mind to clarify how to access nested JSON elements within the locale file?