Releases: alibaba/react-intl-universal
2.13.4
We're excited to announce several new APIs in react-intl-universal that enhance our internationalization capabilities.
These features were implemented in PR #261.
New APIs
formatList- Formats a list of React nodes with locale-appropriate separatorsformatNumber- Formats numbers according to the current localeformatParentheses- Returns locale-specific parentheses formatgetColon- Returns locale-specific colon character
These new APIs provide more granular control over localization formatting, allowing developers to create more culturally appropriate UIs with less manual work.
These additions maintain backward compatibility and follow existing API patterns in the library.
Please check our documentation for detailed usage instructions and examples.
2.12.0
2.11.1
Removing dependency: intl
Add Debugger Mode
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":
2.8.0
Improve type hints
- Improve type hints (#226)
Performance Improvement
- Performance Improvement for
getfunction (#224)
Support ECMAScript module format
Support ECMAScript module format used by Vite.
Fix security vulnerabilities
- Fix security vulnerabilities.
- Remove
console-polyfilldependency.
