
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
svelte-i18n
Advanced tools
Internationalization for Svelte.
svelte-i18n
helps you localize your app using the reactive tools Svelte provides. By using stores to keep track of the current locale
, dictionary
of messages and to format
messages, we keep everything neat, in sync and easy to use on your svelte files.
Requirements
>= 11.15.0
Chrome 38+
, Edge 12+
, Firefox 13+
, Opera 25+
, Safari 8+
.<script>
import { _ } from 'svelte-i18n'
</script>
<h1>{$_('page.home.title')}</h1>
<nav>
<a>{$_('page.home.nav', { default: 'Home' })}</a>
<a>{$_('page.about.nav', { default: 'About' })}</a>
<a>{$_('page.contact.nav', { default: 'Contact' })}</a>
</nav>
// en.json
{
"page": {
"home": {
"title": "Homepage",
"nav": "Home"
},
"about": {
"title": "About",
"nav": "About"
},
"contact": {
"title": "Contact",
"nav": "Contact Us"
}
}
}
2.1.0 (2019-11-30)
🎸 add warnOnMissingMessages (efbe793)
🐛 fallback behaviour and simplify API contact points (6e0df2f
🎸 addMessagesTo
method (d6b8664)
🎸 add $loading indicator store (bd2b350)
🎸 add custom formats support (d483244)
🎸 add pathname and hostname pattern matching (b19b690)
🎸 add preloadLocale method (0a0e4b3)
🎸 add waitInitialLocale helper (6ee28e7)
🎸 also look for message in generic locale (e5d7b84), closes #19
🎸 export a store listing all locales available (f58a20b)
🎸 locale change automatically updates the document lang (64c8e55)
FAQs
Internationalization library for Svelte
The npm package svelte-i18n receives a total of 32,536 weekly downloads. As such, svelte-i18n popularity was classified as popular.
We found that svelte-i18n demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.