
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.
aikit-translator
Advanced tools
ai-translator is a React internationalization translation toolkit based on multiple AI models (such as ChatGPT, Grok, and DeepSeek), supporting multi-language batch translation, automatic extraction of translation keys, command-line batch processing, type safety, and high extensibility.
t() functionsnpm install ai-translator
# or
pnpm add ai-translator
import { TranslationProvider, useTranslation } from "ai-translator";
function App() {
return (
<TranslationProvider
config={{
model: "chatgpt", // Supports chatgpt/grok/deepseek
apiKey: "your-api-key",
sourceLanguage: "en",
targetLanguage: "zh",
}}
>
<YourComponent />
</TranslationProvider>
);
}
function YourComponent() {
const { translate, currentLanguage, setLanguage, isLoading } =
useTranslation();
const handleTranslate = async () => {
const result = await translate("Hello, world!");
console.log(result.text); // 你好,世界!
};
return (
<div>
<button onClick={handleTranslate} disabled={isLoading}>
{isLoading ? "Translating..." : "Translate"}
</button>
</div>
);
}
npx ai-translator extract -i "src/**/*.{ts,tsx,js,jsx}" -o locales/en.json --translate -l zh ja ko fr de es ...
npx ai-translator translate -f ./locales/en.json -m chatgpt -s en -t zh ja ko
npx ai-translator translate -d ./locales -m deepseek -s en -t fr de es
npx ai-translator i18n -i "src/**/*.{ts,tsx,js,jsx}" -o locales/en.json -m grok -s en -t zh ja ko fr de es
| Prop | Type | Required | Description |
|---|---|---|---|
| config | TranslationConfig | Yes | Translation configuration |
| Prop | Type | Required | Description |
|---|---|---|---|
| model | 'grok' | 'chatgpt' | 'deepseek' | Yes | AI translation model |
| apiKey | string | Yes | API key |
| sourceLanguage | string | Yes | Source language |
| targetLanguage | string | Yes | Target language |
| baseUrl | string | No | API base URL |
Returns:
| Prop | Type | Description |
|---|---|---|
| translate | (text: string) => Promise | Translate text |
| currentLanguage | Language | Current language |
| setLanguage | (lang: Language) => void | Set language |
| isLoading | boolean | Whether translating |
AI_TRANSLATOR_API_KEY: API key for AI modelMIT
For detailed documentation, secondary development, or enterprise customization, please contact the imtom.eth@gmail.com.
FAQs
AI-powered translation package for React applications
The npm package aikit-translator receives a total of 4 weekly downloads. As such, aikit-translator popularity was classified as not popular.
We found that aikit-translator demonstrated a healthy version release cadence and project activity because the last version was released less than 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.