1.1.1 • Published 3 years ago

imagenet-labels-i18n v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

imagenet-labels-i18n

Human-readable labels for imagenet, and provide multi-language json.

PS: In order to better describe the content of label, the completed json file may be updated

Usage

npm install imagenet-labels-i18n

imagenet-labels-i18n export default i18n instance, you can use the i18n method directly.

const ImageNetLabelsI18n = require('imagenet-labels-i18n');
// or
import * as ImageNetLabelsI18n from 'imagenet-labels-i18n';

console.log(ImageNetLabelsI18n.__('0')); // -> tench, Tinca tinca

ImageNetLabelsI18n.setLocale('zh');
console.log(ImageNetLabelsI18n.__('0')); // -> 丁鲷

Similarly, you can use i18n directly.

const { I18n } = require('i18n');

const i18n = new I18n({
  locales: ['en', 'zh'],
  directory: path.join('node_modules/imagenet-labels-i18n/locales'),
})

console.log(i18n.__('0')); // -> tench, Tinca tinca

i18n.setLocale('zh');
console.log(i18n.__('0')); // -> 丁鲷

Multilingual status

localestatus
en
zh
jp⏩ (need help, welcome pr)
1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago