@sveltekit-i18n/base 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -85,14 +85,13 @@ export const { t, locale, locales, loading, loadTranslations } = new i18n(config
85
85
  ...load your translations in `+layout.js`...
86
86
 
87
87
  ```js
88
- import { locale, loadTranslations } from '$lib/translations';
88
+ import { loadTranslations } from '$lib/translations';
89
89
 
90
+ /** @type {import('@sveltejs/kit').Load} */
90
91
  export const load = async ({ url }) => {
91
92
  const { pathname } = url;
92
93
 
93
- const defaultLocale = 'en'; // get from cookie, user session, ...
94
-
95
- const initLocale = locale.get() || defaultLocale; // set default if no locale already set
94
+ const initLocale = 'en'; // get from cookie, user session, ...
96
95
 
97
96
  await loadTranslations(initLocale, pathname); // keep this just before the `return`
98
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltekit-i18n/base",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Base functionality of sveltekit-i18n library with a support for external message parsers.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",