Repository navigation
Releases
Releases · JupriLab/i18n
v2.1.4
- Integrated rollup for bundling and reduces bundle size and package size
- Set tsconfig.json declaration property to false and let rollup generates the .d.ts files
Feat
- react-i18n: Created adapter for React
Packages
v2.1.3
This is the stable version for v2.
- Removed
escapeHTMLTagsandinterpolateutils and move them toTranslationManageras private methods. - Removed
appendQueryParamsutil and move it toLanguageManageras private method - Removed mocks in tests for simpler testing
- Removed test cases for
escapeHTMLTagsandinterpolate
v2.1.2
- Refactored codebase into single responsibility classes.
- Created
TranslationManager, andLanguageManager. i18nis now more manageable.
- Created
- Added new type
TEventsfor type safety and better DX - Created test cases for
LanguageManager, andTranslationManager - Removed
ILooseObjectfrom export - Added
TEventsto export
v2.1.1
- Removed throw new Error when user is not in browser environment.
- Will support node environment in future version as node also has URL object
- Wrote test cases for i18n.
v2.1.0
- Removed localStorage to persist data by default and will add it as an optional feature that can be enabled by setting a flag.
- Store
currentLanguagelocally and only provide one option to persistcurrentLanguagewhich is throughqueryParamby settingenableQueryparamsto true. - Set tsconfig module to esnext.
v2.0.0
- Added interpolation feature
- String wrapped with
[]can be interpolated - Added escape HTML feature to prevent XSS.
trueby default
- String wrapped with
- Create move query params logic to
appendQueryParamsfunction in utils - Fixed some typos in documentation.
- Bump package.json version to 2.0.0
- Update documentation for interpolation.
v1.0.0
We are beyond happy to release @jupri-lab/i18n-core. In this first release we focused on making the core functionality which is translating texts. We have achieved that functionality and released the package as v1:
- Created i18n class as an entry point for translation
- Added change language feature with
getChangeLanguageHandler - Added translate feature with
translate - Added get current language feature with
getCurrentLanguage - Added event listener to subscribe and get notified when language is changed with
on("language_changed")
- Added change language feature with
- Created
EventManagerclass to manage event sub and pub - Created documentation in README.md