All Versions
12
Latest Version
Avg Release Cycle
79 days
Latest Release
1547 days ago

Changelog History
Page 1

  • v2.4.0 Changes

    August 20, 2020

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

    intl.init({intlGetHook: (key, currentLocale)=\> {}})
    
  • v2.3.1 Changes

    July 18, 2020

    โšก๏ธ Update intl-messageformat@8 for Number Skeletons.

  • v2.2.1 Changes

    October 14, 2019

    0๏ธโƒฃ react-intl-universal is singleton by default. However, if you would like to have multiple react-intl-universal instance, you could instantiate it on demand.

    import intl from 'react-intl-universal'; // singleton instance
    

    It's equalivent to:

    import { ReactIntlUniversal } from 'react-intl-universal';const intl = new ReactIntlUniversal();
    
  • v2.1.0 Changes

    June 29, 2019

    If there's a item lang=en-US in localStorage, you could determine currentLocale as the following code.

    intl.determineLocale( {localStorageLocaleKey: 'lang'} );
    
  • v2.0.3 Changes

    May 23, 2019

    ๐Ÿš€ In this release, common locale data will not be loaded from CDN anymore. #84
    Please require the locale data like this:

    require('intl/locale-data/jsonp/en.js');
    require('intl/locale-data/jsonp/zh.js');
    

    ๐Ÿ‘€ See the example.

  • v1.15.0 Changes

    October 30, 2018

    ๐Ÿ‘Œ Support fallbackLocale option to use if a key is not found in the currentLocale. #91

  • v1.14.3 Changes

    October 23, 2018

    0๏ธโƒฃ To prevent XSS attack, escaping Html is enabled by default.
    However, if you would like to disable escaping Html in some cases, use escapeHtml option.
    ๐Ÿ‘€ See the test case for example.

  • v1.13.1 Changes

    September 12, 2018

    In ICU standard, brace in message is treated as variable. An object is supposed to be passed as second parameter in the intl.get("key", object) function. Otherwise, react-intl-universal could not format the message, resulting in returning empty string.

    // en-US.jsmodule.exports = ({ "BRACE": "The format is {var}", });intl.get("BRACE"); // Before this release, it return empty string ""
    

    ๐Ÿš€ However, in some case, brace is just a part of the sentence. It's better to be return the original message instead of empty string. This release fixes this issue. Here is the result:

    intl.get("BRACE"); // "The format is {var}"
    intl.get("BRACE", {var: "x.y.z"}); // "The format is x.y.z"
    
  • v1.12.0 Changes

    August 05, 2018

    ๐Ÿš€ The Common Locale Data is now hosted in //g.alicdn.com, however some users in private network may not able to access the internet. This release make the common locale data URL optional. #76, #68, #63, #71

    intl.init({
      // ...
      commonLocaleDataUrls: {
         en: "https://g.alicdn.com/react-intl-universal/locale-data/1.0.0/en.js",
         zh: "https://g.alicdn.com/react-intl-universal/locale-data/1.0.0/zh.js",
      }
    });
    

    ๐Ÿ‘ Moreover, if you encounter the following error, this options make supporting more languages possible. #51

    Language "${lang}" is not supported.
    
  • v1.11.1 Changes

    May 13, 2018

    โš  Whenever a default message is missing or having error for formatting a message, react-intl-universal will log warning message like this react-intl-universal key "not-exist-key" not defined in en-US.

    โš  If you would like to log these messages using third party services or even turn off the message, here is a chance to add custom warning handler in init function.

    const locales = {...};const currentLocale = "en-US";const warningHandler = (message, detail) =\> {...}; // Define your custom warning handlerintl.init({ locales, currentLocale, warningHandler })
    

    ๐Ÿš€ This release fixes #44 and #45.