JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q41775F
  • License ISC

The Easiest Static Internationalization for React and Next.js

Package Exports

  • react-intl-lil
  • react-intl-lil/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-intl-lil) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


react-intl-lil

The Easiest Static Internationalization for React and Next.js

Features

Common internationalizations package have a problem, they are built with dynamic websites in mind.

  • Multi-Language Support 🎯
    Supports both single and multiple languages with easy configuration for updates.
  • Local Storage for User Preferences πŸ—³οΈ
    Stores the user’s language preference in localStorage for persistence across sessions.
  • No Extra Server Configuration πŸ™…πŸ»
    Ideal for SPAs with zero need for additional server setup or configurations.
  • Easy Setup & Fast Deployment πŸš€
    Quick to install and configure, ready to use in minutes.
  • Built with TypeScript πŸ”“
    Fully typed with TypeScript for enhanced development experience and type safety.

What does it look like?

// page.tsx
import { useLanguage, LangProvider } from 'react-intl-lil';
import { langConfig } from '@/config';

export default function Home() {
  const { gs, ga } = useLanguage();
  const ver = '1.1.2';

  return (
  <>
    <LangProvider langConfig={langConfig}>
      <h1>{gs('home.title')}</h1>
      <p>{gs('home.version', { version: ver })}</p>
      <ul>
        {ga('home.features').map((item) => (
          <li key={item.title}>
            <h2>{item.title}</h2>
            <p>{item.data}</p>
          </li>
        ))}
      </ul>
    </LangProvider>
  );
}
// en.ts
const data = {
  home: {
    title: 'Welcome to react-intl-lil',
    version: 'Current version: {{version}}',
    features:[
      {title:"Multi language", data:"Single and multi language support"}
      {title:"Local Storage", data:"For persistence across sessions"}
    ]
  },
};

Docs and demos

Just remember the guides themselves are the demos, source code available.

Donations

This package takes time and effort to maintain, and frequent blackouts in my country make it harder. Your support would help keep development going.

Every contribution helps bring light to the project!