sveltekit-i18n
Advanced tools
Comparing version 2.4.0 to 2.4.1
{ | ||
"name": "sveltekit-i18n", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "Internationalization library for SvelteKit", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -81,10 +81,9 @@ [![npm version](https://badge.fury.io/js/sveltekit-i18n.svg)](https://badge.fury.io/js/sveltekit-i18n) ![](https://github.com/sveltekit-i18n/lib/workflows/Tests/badge.svg) | ||
```javascript | ||
import { locale, loadTranslations } from '$lib/translations'; | ||
import { loadTranslations } from '$lib/translations'; | ||
/** @type {import('@sveltejs/kit').Load} */ | ||
export const load = async ({ url }) => { | ||
const { pathname } = url; | ||
const defaultLocale = 'en'; // get from cookie, user session, ... | ||
const initLocale = locale.get() || defaultLocale; // set default if no locale already set | ||
const initLocale = 'en'; // get from cookie, user session, ... | ||
@@ -91,0 +90,0 @@ await loadTranslations(initLocale, pathname); // keep this just before the `return` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8959
115