Advanced
Storage Adapters
Storage adapters persist the user's locale choice across page loads. LocalStorage, URL, and cookie adapters are the stable convenience paths; database, hybrid, and IndexedDB helpers remain experimental.
ts
import { createLocalStorageAdapter } from '@pico-intl-dev/core/storage';
createI18n({
base: 'en',
locale: 'auto',
messages,
storage: createLocalStorageAdapter('app-locale'),
}); Key points
- LocalStorage, URL, and cookie adapters are the stable convenience paths.
- Database, hybrid, and IndexedDB helpers are experimental.
- Storage should match your deployment and privacy model.
Next step
Copy the example into a small fixture, run the validation commands, and keep framework-specific routing, hydration, or SSR behavior covered by your app tests.