Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sveltekit-i18n

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sveltekit-i18n - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

2

package.json
{
"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`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc