product icon

Paraglide JS

App

Migrating to v2

  1. Language tag has been renamed to locale to align with industry standards.
-languageTag()
+getLocale()
-setLanguageTag()
+setLocale()
-availableLanguageTags
+availableLocales
  1. The onSetLanguageTag has been removed in favor of simplifying writing strategies/adapters.

-onSetLanguageTag(() => {
  // do seomthing
})

+defineSetLocale(() => {
  // do something
})
  1. If you use vite or another bundler, import the plugin directly from @inlang/paraglide-js
-import { paraglide } from "@inlang/paraglide-vite";
+import { paraglideVitePlugin } from "@inlang/paraglide-js";