simple language loader - A high-performance language loader for internationalization (i18n) using Rust and N-API, supporting multiline strings, arrays, comments, and caching.
npm install @skidy89/ssl.js
Simple Language Loader is a fast and lightweight Rust + N-API addon for Node.js that provides a simple yet powerful way to load .lang files with support for arrays, multiline strings, and comments.
It’s designed for multilingual projects that need high performance and easy js/ts integration
bash
npm i @skidy89/ssl.js
`Example
`ts
import { loadChdlang, generateTypescriptDefs, clearLangCache, load_lang_dsk } from "@skidy89/ssl.js"// create map cached langs
const langs = loadChdlang("./languages")
// or if you prefer, without any cached langs
const uncachlangs = load_lang_dsk("./languages")
console.log(langs.en.HELLO)
console.log(langs.es.GOODBYE)
// generate typescript files, will throw an error if the path doesnt exist
generateTypescriptDefs("./languages", "./types/langs.d.ts")
// clean the cached languages
clearLangCache()
``> [!WARNING]
> this project is still on development, if you encounter an error, let me know or make a pull request