{"repo":"sveltia/sveltia-i18n","free":true,"listed":false,"github":"https://github.com/sveltia/sveltia-i18n","clone":"git clone https://github.com/sveltia/sveltia-i18n.git","description":"An internationalization (i18n) library for Svelte applications that uses Unicode MessageFormat 2 (MF2) to format messages.","language":"JavaScript","stars":21,"topics":["i18n","internationalization","l10n","localization","messageformat","svelte","translation","sveltekit"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Sveltia I18n An internationalization (i18n) library for Svelte applications. Heavily inspired by svelte-i18n, but powered by Svelte 5 Runes and the messageformat library for formatting messages using Unicode MessageFormat 2 (MF2), which supports complex pluralization and selection patterns in addition to simple variable interpolation. Table of Contents - Motivation - Installation - Usage - SvelteKit usage - Async loading with SSR - Server-side locale via Accept-Language - Client-side locale detection - API - State - locales - dictionary - isLoading() - Locale - locale - isRTL(locale?) - getLocaleFromNavigator() - getLocaleFromHostname(pattern) - getLocaleFromPathname(pattern) - getLocaleFromQueryString(key) - getLocaleFromHash(key) - Configuration - init(options) - Default format options - Formatting in another locale - Loader - register(localeCode, loader) - waitLocale(localeCode?) - Messages - addMessages(localeCode, ...maps) - registerMessageFunction(name, fn) - Formatting - format(key, options?) / (key, options?) / t(key, options?) - Overriding formats in a message - json(prefix, options?) - Date, time & number - date(value, options?) - time(value, options?) - number(value, options?) - Message Format - Simple interpolation - Pluralization - Ordinal numbers - Gender selection - Number formatting - Date and time - Built-in MF2 functions - Compatibility with svelte-i18n - Functions - Key differences - Examples Motivation We had used svelte-i18n in our Sveltia CMS for years, ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sveltia","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sveltia/sveltia-i18n/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}