alibaba / react-intl-universal

Internationalize React apps. Not only for Component but also for Vanilla JS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mirror react-intl API

aeirola opened this issue · comments

First, thanks for creating this package! I've been looking for something similar ever since I started using react-intl.

As the documentation suggests this package as an replacement to react-intl, it would be really nice if it would provide the same API as the injected intl object.

So instead of formatting a message with

intl.get('SIMPLE')

it would use the same API as react-intl

intl.formatMessage({id: 'SIMPLE'})

This would make it a lot easier for existing users of react-intl to transition to this package.

@aeirola That's good idea. I will implement it recently.