Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@apitable/i18n
Advanced tools
APITable i18n
is a a simple / easy-to-use / lightweight internationalization tool.
It provides:
APITable Settings Generator
to generate JSON settings.Java
and TypeScript
SDK as an i18n sdk runtime.APITable-i18n
has these advantages:
Imagine it, you have a locales.json
file:
{
"en-US": {
"text1": "This is text 1",
"text2": "This is text 2"
},
"zh-CN": {
"text1": "这是中文1"
}
}
Then:
Install APITable i18n :
npm i --save @apitable/i18n
import { I18N, ILanguagePackerLoader, ILanguagePack } from '@apitable/i18n';
const languagePacks = require('./locales.json');
const i18n = I18N.createByLanguagePacks(languagePacks);
i18n.setLanguage('zh-CN');
const res = i18n.getText('text1')
console.log(res);
// will print '这是中文1';
// build.gradle
dependencies {
compile group: 'com.apitable', name: 'i18n', version: '1.0.0'
}
If you want to integration @apitable/i18n
with APITable.
Go with APITable Settings Generator
.
You can get an APITable template that use for your i18n.
https://apitable.com/template/i18n
Use apitable-settings-generator and the column-files
format to generate i18n languages packs.
The config.json:
[
{
"dirName": "./generated",
"fileName": "locales.*.json",
"tables": {
{
"datasheetId": "dstbUhd5coNXQoXFD8",
"datasheetName": "strings",
"format": "column-files",
"params": {}
}
}
}
]
Run to generate i18n strings:
# run in bash
npx apitable-settings-generator --config config.json --token ${HERE_IS_YOUR_APITABLE_TOKEN}
Generated settings locales.en_US.json:
{
"strings": {
"en_US": {
"login_title": "Login APITable",
"some text": "some text en_US"
}
}
}
Generated settings locales.zh_CN.json:
{
"strings": {
"zh_CN": {
"login_title": "中文APITable",
"some text": "some text zh_CN"
}
}
}
Then you will get:
yarn
yarn build
FAQs
i18n Locales with APITable power.
The npm package @apitable/i18n receives a total of 115 weekly downloads. As such, @apitable/i18n popularity was classified as not popular.
We found that @apitable/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.