diff --git a/CHANGELOG.md b/CHANGELOG.md index 90ad8676..b931b998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## Unreleased - [0.1.4] +## 2024-06-25 - [0.1.4] ### New features @@ -281,7 +281,7 @@ version to `0.1` during installation. - Added all ISO-639-1 and ISO-639-2 languages. -[0.1.4]: https://github.com/mondeja/leptos-fluent/compare/v0.1.3...master +[0.1.4]: https://github.com/mondeja/leptos-fluent/compare/v0.1.3...v0.1.4 [0.1.3]: https://github.com/mondeja/leptos-fluent/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/mondeja/leptos-fluent/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/mondeja/leptos-fluent/compare/v0.1.0...v0.1.1 diff --git a/README.md b/README.md index 14877b73..2122b9b5 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ fn App() -> impl IntoView { // Check translations correctness in the specified files. check_translations: "./src/**/*.rs", - // All next options are all opt-in and can be enabled + // Next options are all opt-in and can be enabled // separately as needed. // Client side options @@ -128,6 +128,12 @@ fn App() -> impl IntoView { // Get the initial language from `navigator.languages` if not // found in the local storage. initial_language_from_navigator: true, + // Set the discovered initial language of the user from + // the navigator to local storage. + initial_language_from_navigator_to_localstorage: true, + // Set the discovered initial language of the user from + // the navigator to a cookie. + initial_language_from_navigator_to_cookie: true, // Attributes to set for the language cookie. // By default is `""`. cookie_attrs: "SameSite=Strict; Secure; Path=/; Max-Age=600", diff --git a/leptos-fluent/README.md b/leptos-fluent/README.md index 14877b73..2122b9b5 100644 --- a/leptos-fluent/README.md +++ b/leptos-fluent/README.md @@ -95,7 +95,7 @@ fn App() -> impl IntoView { // Check translations correctness in the specified files. check_translations: "./src/**/*.rs", - // All next options are all opt-in and can be enabled + // Next options are all opt-in and can be enabled // separately as needed. // Client side options @@ -128,6 +128,12 @@ fn App() -> impl IntoView { // Get the initial language from `navigator.languages` if not // found in the local storage. initial_language_from_navigator: true, + // Set the discovered initial language of the user from + // the navigator to local storage. + initial_language_from_navigator_to_localstorage: true, + // Set the discovered initial language of the user from + // the navigator to a cookie. + initial_language_from_navigator_to_cookie: true, // Attributes to set for the language cookie. // By default is `""`. cookie_attrs: "SameSite=Strict; Secure; Path=/; Max-Age=600", diff --git a/leptos-fluent/src/lib.rs b/leptos-fluent/src/lib.rs index fa2f62e9..52bbad6d 100644 --- a/leptos-fluent/src/lib.rs +++ b/leptos-fluent/src/lib.rs @@ -92,7 +92,7 @@ //! // Check translations correctness in the specified files. //! check_translations: "./src/**/*.rs", //! -//! // All next options are all opt-in and can be enabled +//! // Next options are all opt-in and can be enabled //! // separately as needed. //! //! // Client side options @@ -125,6 +125,12 @@ //! // Get the initial language from `navigator.languages` if not //! // found in the local storage. //! initial_language_from_navigator: true, +//! // Set the discovered initial language of the user from +//! // the navigator to local storage. +//! initial_language_from_navigator_to_localstorage: true, +//! // Set the discovered initial language of the user from +//! // the navigator to a cookie. +//! initial_language_from_navigator_to_cookie: true, //! // Attributes to set for the language cookie. //! // By default is `""`. //! cookie_attrs: "SameSite=Strict; Secure; Path=/; Max-Age=600",