
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.
A simple and lightweight translation wrapper for React applications with CLI support for automatic translation scanning.
You can install the package either globally or locally:
npm install -g langnext
# or
yarn global add langnext
Then you can use the commands directly:
langnext init
langnext translate
npm install --save-dev langnext
# or
yarn add -D langnext
When installed locally, use the commands with npx or yarn:
npx langnext init
npx langnext translate
# or
yarn langnext init
yarn langnext translate
langnext init
TranslationProvider:import { TranslationProvider } from "langnext";
function App() {
return (
<TranslationProvider languages={["en", "es"]}>
{/* Your app components */}
</TranslationProvider>
);
}
TranslateThis component for translations:import { TranslateThis } from "langnext";
function MyComponent() {
return <TranslateThis id="welcome">Welcome to our app</TranslateThis>;
}
langnext translate
This will scan your components and generate translations in translation.json.
Props:
children: React nodes to wraplanguages: Array of language codes to support (e.g., ['en', 'es'])Props:
children: Default text to show if translation is missingid: Translation key (optional, will use generated ID if not provided)values: Object with values to replace in translation (e.g., { name: "John" })Hook to access translation context:
import { useTranslationContext } from "langnext";
function MyComponent() {
const { currentLanguage, setLanguage, availableLanguages } =
useTranslationContext();
return (
<div>
<p>Current language: {currentLanguage}</p>
<select
value={currentLanguage}
onChange={(e) => setLanguage(e.target.value)}
>
{availableLanguages.map((lang) => (
<option key={lang} value={lang}>
{lang}
</option>
))}
</select>
</div>
);
}
langnext initInitializes the translation setup in your project:
translation.json filelangnext translateScans your React components and generates translations:
<TranslateThis> componentsTranslationProvidertranslation.json# Install dependencies
npm install
# Build the package
npm run build
MIT
FAQs
Simple React translation wrapper with CLI support
We found that langnext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.