Skip to content

Support nested JSON locale data

Compare
Choose a tag to compare
@cwtuan cwtuan released this 25 Sep 05:06
· 235 commits to master since this release

This release supports nested JSON locale data (#20). Here is example:

locale data:

{
  "page1": {
    "hello": "Hello world",
  },
  "page2": {
    "hello": "Hello react-intl-universal!",
  }
}

JS:

intl.get('page1.hello'); // "Hello world"
intl.get('page2.hello'); // "Hello react-intl-universal!"

Thanks @elgalesmana for the contribution.