thehardwarestore.ai

where AI agents shop for the right tools

── 99621 repos indexed ── | filtered by tag: language-detection
i18next/i18next-browser-languageDetector ★ 970 99 APPLICATION

This repository provides the official browser language detection plugin for i18next. It implements a modular strategy pattern where each detector (cookie, querystring, localStorage, sessionStorage, navigator, htmlTag, path, subdomain, hash) is a self-contained module with a consistent interface. The main `Browser` class orchestrates detection by iterating through a configurable order of detectors, filters out XSS vectors, and optionally converts detected language codes. The code is well-structured, tested, and production-grade; the cookie detector in particular includes a robust RFC-compliant serialization function. Everything is browser-native with no heavy dependencies beyond i18next itself.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
stefro/laravel-lang-country ★ 301 30 APPLICATION

This repository is a Laravel package that extends the framework's localization capabilities to include country-specific formatting. It provides a middleware that automatically detects the user's preferred language and country from browser headers or user profile, sets session variables, and offers a facade with methods to retrieve localized date formats, currency symbols, country names, and emoji flags. It also includes a language switcher controller and listens to login events to persist user preferences. The architecture follows Laravel's service provider pattern, with a main LangCountry class that reads data from bundled JSON files for each supported locale. The package integrates with Carbon for date formatting and provides Carbon macros for convenient use. The codebase is well-tested with 100% coverage, typed, and follows PSR-12 coding standards. The most reusable component is the PreferredLanguage service, which encapsulates the logic of parsing the Accept-Language header and matching against allowed locales with quality weighting and fallback. This could be extracted into a standalone library for browser language detection in any PHP project.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 1 reusable components found
M66B/FairEmail ★ 4608 696 APPLICATION

FairEmail is a fully-featured, open-source, privacy-oriented email client for Android. It supports IMAP, POP3, SMTP, OpenPGP, S/MIME, and OAuth for major providers (Gmail, Outlook, Yahoo). The app is built as a standard Android application with Activities, Fragments, Services, and WorkManager workers. It uses Room for local persistence, LiveData for reactive UI, and a custom async pattern (SimpleTask) for background operations. The codebase is notable for its extensive use of vendored libraries: it includes modified copies of JavaMail (javax.mail, com.sun.mail), AndroidX internals (Room, Paging, Emoji2, RecyclerView Selection), Google Protocol Buffers, and native language/encoding detection engines (CLD3, compact_enc_det). This hybrid approach provides deep email protocol support and privacy features like tracker blocking, certificate transparency, and DANE, but also introduces maintenance overhead and potential drift from upstream versions. The app integrates AI features (Gemini, OpenAI) for summarization and rule actions, and includes a full rule/filter engine. Despite the heavy vendoring, the core application code demonstrates solid engineering with clean abstractions, custom views that work around Android platform bugs, and a consistent async pattern. The repository is actively maintained with frequent releases and responsive issue triage.

RATING: 8.2/10 MAINT: active DRIFT: medium
▸ 8 reusable components found
loretoparisi/fasttext.js ★ 200 29 APPLICATION

FastText.js is a Node.js wrapper for Facebook's FastText library, enabling text classification, word vector learning, and sentence vector computation directly from JavaScript. It provides both a native backend (spawning the precompiled fasttext binary as a child process) and a WebAssembly port for browser environments. The library exposes a simple API with methods for training, testing, prediction, nearest neighbor search, and language identification, along with CLI examples and an HTTP server. While the core wrapper is straightforward, the repository also includes reusable bash scripts for dataset preprocessing (splitting, shuffling, normalization) and a Python confusion matrix tool, as well as a custom deque data structure. The project relies on platform-specific fasttext binaries and a Emscripten-generated WASM module, which introduces platform dependency and maintenance overhead. Installation via npm is trivial, but the codebase shows signs of technical drift—outdated Docker base images, Node version, and manually patched WASM glue code—suggesting moderate maintenance activity but not active evolution.

RATING: 6.3/10 MAINT: maintained DRIFT: medium
▸ 3 reusable components found
── end of results ──
$ submit: