Skip to content

Releases: alibaba/react-intl-universal

2.12.0

02 Dec 11:56
31f5202
Compare
Choose a tag to compare

Add new method changeCurrentLocale (#256)

2.11.1

25 Feb 06:49
Compare
Choose a tag to compare

Removing dependency: intl

16 Dec 08:30
5950485
Compare
Choose a tag to compare

Changes

  • Dependency Update: In this release, we have removed the dependency on Intl.js. The Intl object, which Intl.js was originally introduced as a polyfill for, is now supported in modern browsers. As a result, the polyfill is no longer necessary.

Bug Fixes

  • #154: vite: global is undefined

Add Debugger Mode

11 Nov 09:21
Compare
Choose a tag to compare

When developing a website with multiple languages (i18n), translators are usually responsible for translating the content instead of the web developer. However, translators often struggle to find the specific message they need to edit on the webpage because they don't know its key. This leads to them having to ask the developer for the key, resulting in a lot of time wasted on communication.

To solve this issue, a solution is proposed: When the debugger mode in react-intl-universal is enabled, each message on the webpage will be wrapped in a special span element with the key "data-i18n-key". This way, translators can easily see the key of the message and make the necessary edits themselves using some message management system, without needing to ask the developer.

Enabling debugger mode:

intl.init({
  // ...
  debug: true
})

Message will be wrapped in a span element with the key "data-i18n-key":

debugger mode

2.8.0

03 Nov 13:38
Compare
Choose a tag to compare
  • fix: moduleResolution Bundler error (#236)

Improve type hints

26 Sep 15:37
Compare
Choose a tag to compare
  • Improve type hints (#226)

Performance Improvement

15 Sep 11:46
Compare
Choose a tag to compare
  • Performance Improvement for get function (#224)

Support ECMAScript module format

25 Aug 07:20
Compare
Choose a tag to compare

Fix security vulnerabilities

06 Apr 12:06
Compare
Choose a tag to compare
  • Fix security vulnerabilities.
  • Remove console-polyfill dependency.

Add hooks in get and getHTML methods

20 Aug 11:16
Compare
Choose a tag to compare

When run intl.get or intl.getHTML, the intlGetHook will be called.

intl.init({
 intlGetHook: (key, currentLocale)=> {} 
})