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 1.5.0 to 1.5.1

2

package.json
{
"name": "sveltekit-i18n",
"version": "1.5.0",
"version": "1.5.1",
"description": "Internationalization library for SvelteKit",

@@ -5,0 +5,0 @@ "type": "module",

@@ -81,3 +81,3 @@ [![npm version](https://badge.fury.io/js/sveltekit-i18n.svg)](https://badge.fury.io/js/sveltekit-i18n) ![](https://github.com/jarda-svoboda/sveltekit-i18n/workflows/Tests/badge.svg)

<script context="module">
import { loadTranslations } from '$lib/translations';
import { locale, loadTranslations } from '$lib/translations';

@@ -87,5 +87,8 @@ export const load = async ({ url }) => {

const locale = 'en'; // get from cookie or user session...
await loadTranslations(locale, pathname);
const defaultLocale = 'en'; // get from cookie, user session, ...
const initLocale = locale.get() || defaultLocale; // set default if no locale already set
await loadTranslations(initLocale, pathname);
return {};

@@ -92,0 +95,0 @@ }

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