
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
node-vk-bot-api-i18n
Advanced tools
🇪🇺 I18n middleware for node-vk-bot-api.
$ npm i node-vk-bot-api-i18n -S
Before you must set TOKEN
and GROUP_ID
in process.env
.
$ npm test
const VkBot = require('node-vk-bot-api')
const Session = require('node-vk-bot-api/lib/session')
const I18n = require('node-vk-bot-api-i18n')
const path = require('path')
const bot = new VkBot({
token: process.env.TOKEN,
group_id: process.env.GROUP_ID
})
const session = new Session()
const i18n = new I18n({
locales: ['en', 'ru'],
defaultLocale: 'en',
directory: path.join(__dirname, 'locales')
})
bot.use(session.middleware())
bot.use(i18n.middleware())
bot.command('/start', (ctx) => {
ctx.reply(ctx.i18n.__('start', {
name: 'Mikhail'
}))
})
bot.startPolling()
locales
: Languages listdefaultLocale
: Default languagedirectory
: Absolute path to locales directoryctx.i18n.locale=
: Setter for localectx.i18n.locale
: Getter for localectx.i18n.__(key, [variables])
: Generate message from templateAll files must be store as json.
{
"start": "Hello, %name%!",
"errors": {
"userNotFound": "User not found."
}
}
MIT.
FAQs
I18n middleware for node-vk-bot-api
The npm package node-vk-bot-api-i18n receives a total of 9 weekly downloads. As such, node-vk-bot-api-i18n popularity was classified as not popular.
We found that node-vk-bot-api-i18n 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.