
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@awsless/i18n
Advanced tools
The `@awsless/i18n` package is a Vite plugin that automatically translates your text during build time using AI or any other tool you prefer. The plugin will inline the translations so you don't have to worry about loading the translations at the right ti
The @awsless/i18n package is a Vite plugin that automatically translates your text during build time using AI or any other tool you prefer. The plugin will inline the translations so you don't have to worry about loading the translations at the right time. This means, switching the locale will instantly switch all your translated text on the page.
Install with (NPM):
npm i @awsless/i18n
import { i18n, ai } from '@awsless/i18n'
import { openai } from '@ai-sdk/openai'
export defineConfig({
plugins: [
i18n({
default: 'en',
locales: ['es', 'jp'],
translate: ai({
maxTokens: 32_000,
model: openai('gpt-4.1'),
})
})
]
})
import { lang } from '@awsless/i18n/svelte'
const count = 1
lang.t`${count} count`
The plugin will find all instances where you want text to be translated. The text is translated automatically during build time to produce a bundled output something like this:
import { lang } from '@awsless/i18n/svelte'
const count = 1
lang.t.get(lang.s`${count} count`, {
es: lang.s`${count} contar`,
jp: lang.s`${count} カウント`,
})
To change the locale that is being rendered simply change the lang.locale property.
import { lang } from '@awsless/i18n/svelte'
lang.locale = 'jp'
A i18n.generated.json file with the auto-generated translations will be created in the root of your project the first time you run a build. We use this file as a cache to not translate any text that has already been translated before.
If you want to overwrite an AI-generated translation, create or edit i18n.json. Any translation in i18n.json takes precedence over the generated cache during build time.
{
"${count} count": {
"es": "${count} contar",
"jp": "${count} カウント"
}
}
FAQs
The `@awsless/i18n` package is a Vite plugin that automatically translates your text during build time using AI or any other tool you prefer. The plugin will inline the translations so you don't have to worry about loading the translations at the right ti
We found that @awsless/i18n demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.