diff --git a/CHANGELOG.md b/CHANGELOG.md index f6e1f6e..9831c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ > breaking changes and/or new features that you need to implement in your > project. +## 1.4.2 (January 11, 2024) + +- Fix fallback language selection logic. Before, when the `lang` option wasn't provided to the constructor, and there was no URL parameter, and the user hadn't yet selected/clicked (saved) a language, everything crashed. Now, the fallback language will be used in this case. +- Fix language selection logic about saved language. +- Slight performance improvement. +- Improve documentation and demo site. + ## 1.4.1 (October, 2023) - Ignore `data-si18n` attributes with no value. diff --git a/package.json b/package.json index e163fe8..824a6ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "si18n.js", - "version": "1.4.1", + "version": "1.4.2", "description": "A simple and lightweight way to integrate internationalization on a small web site project.", "main": "./si18n.js", "directories": { diff --git a/src/si18n.js b/src/si18n.js index 000f259..630f976 100644 --- a/src/si18n.js +++ b/src/si18n.js @@ -1,5 +1,5 @@ /*! - * @license si18n.js - v1.4.1 + * @license si18n.js - v1.4.2 * Copyright (c) José dBruxelles . * * This source code is licensed under the MIT license found in the @@ -9,7 +9,7 @@ * Make translation management easier and more efficient. */ export default class Si18n { - static version = "1.4.1"; + static version = "1.4.2"; #noop() {} // Empty function to avoid undefined paramaters. #isInitialized = false; #options = { diff --git a/website/index.html b/website/index.html index 53a6810..09ea097 100644 --- a/website/index.html +++ b/website/index.html @@ -169,7 +169,7 @@

<!-- (?target=es2015|es2022|esnext) --> <script type="module" src="https://esm.sh/si18n.js@latest"></script> -<script type="module" src="https://cdn.jsdelivr.net/npm/si18n.js@1.4.1/+esm"></script> +<script type="module" src="https://cdn.jsdelivr.net/npm/si18n.js@latest/+esm"></script> <!-- UNPKG --> <script type="module">