Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@inlang/paraglide-js
Advanced tools
[![Inlang-ecosystem compatibility badge](https://cdn.jsdelivr.net/gh/opral/monorepo@main/inlang/assets/md-badges/inlang.svg)](https://inlang.com)
To use Paraglide standalone without a framework, run the following command:
npx @inlang/paraglide-js@latest init
This will:
messages/
folder where your translation files livebuild
script in package.json
Running the Paraglide compiler will generate a src/paraglide
folder. This folder contains all the code that you will use in your app.
Messages are stored in messages/{lang}.json
as key-value pairs. You can add parameters with curly braces.
// messages/en.json
{
"$schema": "https://inlang.com/schema/inlang-message-format",
+ "greeting": "Hello {name}!"
}
Make sure to re-run the paraglide compiler after editing your messages.
npx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/paraglide
If you are using a Bundler use one of the Bundler Plugins to recompile automatically.
After running the compiler import the messages with import * as m from "./paraglide/messages"
. By convention, a wildcard import is used.
import * as m from "./paraglide/messages.js"
m.hello() // Hello world!
m.loginHeader({ name: "Samuel" }) // Hello Samuel, please login to continue.
Find examples of how to use Paraglide on CodeSandbox or in our GitHub repository.
Of course, we're not done yet! We plan on adding the following features to Paraglide JS soon:
FAQs
[![Inlang-ecosystem compatibility badge](https://cdn.jsdelivr.net/gh/opral/monorepo@main/inlang/assets/md-badges/inlang.svg)](https://inlang.com)
The npm package @inlang/paraglide-js receives a total of 16,547 weekly downloads. As such, @inlang/paraglide-js popularity was classified as popular.
We found that @inlang/paraglide-js 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.