Skip to content

opnsrcntrbtr/lingo-indica.dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,317 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ lingo-indica.dev adds Indic language features to OG Lingo.dev - open-source, AI-powered i18n toolkit for instant localization with LLMs. Bring your own LLM or use Lingo.dev Translation Engine. Comprehensive Indic language support for all 22 scheduled Indian languages - Indian numbering system formatting lakh/crore


Lingo.dev CompilerLingo.dev CLILingo.dev CI/CDLingo.dev SDK

Release License Last Commit Product Hunt #1 Product of the Day Github trending


Meet the Compiler 🆕

Lingo.dev Compiler is a free, open-source compiler middleware, designed to make any React app multilingual at build time without requiring any changes to the existing React components.

Install once:

npm install lingo-indica.dev

Enable in your build config:

import lingoCompiler from "lingo-indica.dev/compiler";

const existingNextConfig = {};

export default lingoCompiler.next({
  sourceLocale: "en",
  targetLocales: ["es", "fr"],
})(existingNextConfig);

Run next build and watch Spanish and French bundles pop out ✨

Read the docs → for the full guide, and Join our Discord to get help with your setup.


🇮🇳 World-Class Indic Language Support

Lingo-Indica.dev provides comprehensive support for all 22 scheduled languages of India, making it the most complete i18n solution for Indian languages.

Key Features

✨ Complete Language Coverage

Support for 22+ Indic languages including:

  • Major languages: Hindi (hi), Bengali (bn), Tamil (ta), Telugu (te), Marathi (mr), Gujarati (gu), Kannada (kn), Malayalam (ml), Punjabi (pa), Odia (or)
  • Additional languages: Assamese (as), Kashmiri (ks), Sindhi (sd), Konkani (kok), Manipuri/Meitei (mni), Sanskrit (sa), Nepali (ne), Santhali (sat), Maithili (mai), Bodo (brx), Dogri (doi)

🔤 Multi-Script Language Support

First-class support for languages written in multiple scripts:

  • Punjabi: Gurmukhi (ਪੰਜਾਬੀ) and Shahmukhi (پنجابی)
  • Kashmiri: Arabic and Devanagari scripts
  • Sindhi: Arabic and Devanagari scripts
  • Manipuri: Bengali and Meitei Mayek scripts

🔢 Native Numeral Systems

Support for 11 distinct Indic numeral systems with bidirectional conversion:

Script Native Digits Example
Devanagari ०१२३४५६७८९ १२३
Bengali ০১২৩৪৫৬৭৮৯ ১২৩
Tamil ௦௧௨௩௪௫௬௭௮௯ ௧௨௩
Telugu ౦౧౨౩౪౫౬౭౮౯ ౧౨౩
Kannada ೦೧೨೩೪೫೬೭೮೯ ೧೨೩
Malayalam ൦൧൨൩൪൫൬൭൮൯ ൧൨൩
Gujarati ૦૧૨૩૪૫૬૭૮૯ ૧૨૩
Gurmukhi ੦੧੨੩੪੫੬੭੮੯ ੧੨੩
Odia ୦୧୨୩୪୫୬୭୮୯ ୧୨୩
Meitei Mayek ꯰꯱꯲꯳꯴꯵꯶꯷꯸꯹ ꯱꯲꯳
Ol Chiki ᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙ ᱑᱒᱓

💰 Indian Number Formatting

Proper support for Indian numbering conventions:

  • Lakh (1,00,000) and Crore (1,00,00,000) formatting
  • Indian comma placement (pairs after first three digits)
  • Auto-formatting based on magnitude
  • Native digit support for all formats
formatIndianNumber(123456789);    // "12,34,56,789"
autoFormatIndianNumber(1500000);  // "15.00 lakhs"
autoFormatIndianNumber(25000000); // "2.50 crores"

// With native digits in Hindi
formatIndianNumber(100000, true, "hi");  // "१,००,०००"

📅 Indian Date Formatting

Support for Indian date conventions:

  • DD-MM-YYYY format (Indian standard)
  • Alternative formats (YYYY-MM-DD, MM-DD-YYYY)
  • Custom separators
  • Native numeral support

🎯 Script Detection & Validation

Automatic script detection and validation:

  • Detect primary and alternative scripts for any language
  • Text direction detection (LTR/RTL)
  • Script-specific validation
  • ISO 15924 script code compliance

Usage Examples

Translating to Multiple Indic Languages

# Translate to Hindi, Tamil, and Bengali
npx lingo.dev@latest run --target hi,ta,bn

# Translate to all South Indian languages
npx lingo.dev@latest run --target ta,te,kn,ml

# Translate to languages with multi-script support
npx lingo.dev@latest run --target pa,ks,sd,mni

Using Native Numerals

import { toNativeNumerals, fromNativeNumerals } from "lingo.dev/locales";

// Convert to Hindi Devanagari numerals
toNativeNumerals("123456", "hi");  // "१२३४५६"

// Convert from Bengali numerals
fromNativeNumerals("১২৩৪৫৬", "bn");  // "123456"

Indian Number Formatting

import { 
  formatIndianNumber, 
  formatLakhs, 
  formatCrores,
  autoFormatIndianNumber 
} from "lingo.dev/locales/formatting/indic";

// Standard Indian comma placement
formatIndianNumber(123456789);  // "12,34,56,789"

// Lakh and crore formatting
formatLakhs(1500000);   // "15.00"
formatCrores(25000000); // "2.50"

// Auto-format with units
autoFormatIndianNumber(1500000);   // "15.00 lakhs"
autoFormatIndianNumber(25000000);  // "2.50 crores"

// With native digits
formatIndianNumber(100000, true, "hi");  // "१,००,०००"

Script Detection

import { 
  getScriptForLanguage, 
  getAllScriptsForLanguage,
  isIndicLanguage,
  getScriptDirection 
} from "lingo.dev/locales";

// Get primary script for a language
getScriptForLanguage("hi");  // "Deva" (Devanagari)
getScriptForLanguage("ta");  // "Taml" (Tamil)

// Get all scripts for multi-script languages
getAllScriptsForLanguage("pa");  // ["Guru", "Arab"] - Punjabi
getAllScriptsForLanguage("ks");  // ["Arab", "Deva"] - Kashmiri

// Check if language is Indic
isIndicLanguage("hi");  // true
isIndicLanguage("en");  // false

// Get text direction
getScriptDirection("Deva");  // "ltr"
getScriptDirection("Arab");  // "rtl"

Technical Highlights

164 comprehensive tests (all passing)
Zero TypeScript errors with full type safety
Tree-shakeable - Only import what you use
Zero runtime dependencies for core functionality
W3C compliant - Follows ISO 639, ISO 15924, and BCP 47 standards
Production-ready - Battle-tested with extensive edge case coverage

Documentation

For complete documentation of Indic language features, see:


What's inside this repo?

Tool TL;DR Docs
Compiler Build-time React localization /compiler
CLI One-command localization for web and mobile apps, JSON, YAML, markdown, + more /cli
CI/CD Auto-commit translations on every push + create pull requests if needed /ci
SDK Realtime translation for user-generated content /sdk

Below are the quick hits for each 👇


⚡️ Lingo.dev CLI

Translate code & content straight from your terminal.

npx lingo.dev@latest run

It fingerprints every string, caches results, and only re-translates what changed.

Follow the docs → to learn how to set it up.


🔄 Lingo.dev CI/CD

Ship perfect translations automatically.

# .github/workflows/i18n.yml
name: Lingo.dev i18n
on: [push]

jobs:
  i18n:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: lingodotdev/lingo.dev@main
        with:
          api-key: ${{ secrets.LINGODOTDEV_API_KEY }}

Keeps your repo green and your product multilingual without the manual steps.

Read the docs →


🧩 Lingo.dev SDK

Instant per-request translation for dynamic content.

import { LingoDotDevEngine } from "lingo.dev/sdk";

const lingoDotDev = new LingoDotDevEngine({
  apiKey: "your-api-key-here",
});

const content = {
  greeting: "Hello",
  farewell: "Goodbye",
  message: "Welcome to our platform",
};

const translated = await lingoDotDev.localizeObject(content, {
  sourceLocale: "en",
  targetLocale: "es",
});
// Returns: { greeting: "Hola", farewell: "Adiós", message: "Bienvenido a nuestra plataforma" }

Perfect for chat, user comments, and other real-time flows.

Read the docs →


🤝 Community

We're community-driven and love contributions!

⭐ Star History

If you like what we're doing, give us a ⭐ and help us reach 3,000 stars! 🌟

Star History Chart

🌐 Readme in other languages

English中文日本語한국어EspañolFrançaisРусскийУкраїнськаDeutschItalianoالعربيةעבריתहिन्दीবাংলাفارسی

Don't see your language? Add it to i18n.json and open a PR!

About

Adds Indic language features to OG Lingo.dev - open-source, AI-powered i18n toolkit for instant localization with LLMs. Bring your own LLM or use Lingo.dev Translation Engine. Comprehensive Indic language support for all 22 scheduled Indian languages - Indian numbering system formatting lakh/crore

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.1%
  • JavaScript 0.8%
  • PHP 0.3%
  • MDX 0.3%
  • HTML 0.2%
  • EJS 0.2%
  • Other 0.1%