i18n-t:易于使用的节点i18n实用程序

时间:2021-05-14 00:32:37
【文件属性】:
文件名称:i18n-t:易于使用的节点i18n实用程序
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-14 00:32:37
JavaScript i18n-t 易于使用的i18n实用程序。 它不包含明确的特定中间件等。 var I18n = require ( 'i18n-t' ) ; var i18n = new I18n ( { defaultLocale : 'en' } ) ; // Load locales from a directory i18n . load ( './locales' ) ; // or using a pre-loaded objects i18n . set ( { en : { HELLO : 'Hello {{name}}' , CATS : '{{0}} cats' } } ) ; // Translate sentences i18n . t ( 'en' , 'HELLO' , { name : 'Samy' } ) ; i1
【文件预览】:
i18n-t-master
----.travis.yml(51B)
----test()
--------locales()
--------i18n.js(2KB)
----README.md(663B)
----.gitignore(557B)
----index.js(3KB)
----package.json(608B)

网友评论