
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@fw-components/localize
Advanced tools
A localization utility built on top of lit-localize, providing simplified message extraction and runtime locale switching for web applications.
The package provides two main components:
CLI Tool: A command-line utility (fw-localize) that extracts localizable messages from your source code and generates translation files.
Runtime Library: Functions for loading translations and switching between locales in your application.
The localization workflow consists of:
msg()// Example locales/es.json
{
"Hello": "Hola",
}
Extract messages from your source files:
npx fw-localize extract
Configuration is specified in a localize.json file:
{
"sourceLocale": "en",
"targetLocales": ["es", "fr", "de"],
"tsConfig": "./tsconfig.json",
"output": {
"mode": "runtime",
"outputDir": "./locales"
},
"interchange": {
"format": "json"
}
}
import { configureLocalization, msg } from '@fw-components/localize';
// Configure localization
const { getLocale, setLocale } = configureLocalization({
sourceLocale: 'en',
targetLocales: ['es', 'fr', 'de'],
loadLocale: (locale) => import(`./locales/${locale}.js`)
});
// Use in your components
function renderGreeting(name) {
return html`
<h1>${msg("Hello")}</h1>
`;
}
// Switch locale
await setLocale('es');
Use the msg() function to mark text for translation:
// For static strings
msg("Hello world")
// For strings with expressions
msg(`Hello ${username}`)
For more advanced usage and options, refer to the lit-localize documentation.
FAQs
Localizer built on top of lit-localize
We found that @fw-components/localize 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.