yach.util.translate
v1.0.1
Published
yach-机器翻译
Downloads
14
Keywords
Readme
yach.util.translate
yach-机器翻译
Owner
(069132)
安装
$ npm i yach.util.translate
init
import * as translateUtil from 'yach.util.translate';
translateUtil.translationInitIndexedDB();
saveTranslationToIndexedDB
translateUtil.saveTranslationToIndexedDB;
/**
* @description: 存储翻译数据
* @param {String} tablename:'en'|'zh'|'session' 表名,目前仅支持三个表,不可自定义
* @param {Object} data:{} 要存储的数据,建议以对象的形式存储
* @param {String} id:'aaa' 表的主键
* @return undefined
*/
translateUtil.saveTranslationToIndexedDB(tablename, id, data);
getTranslationFromIndexedDB
translateUtil.getTranslationFromIndexedDB;
/**
* @description: 获取翻译数据
* @param {String} tablename:'en'|'zh'|'session' 表名,目前仅支持三个表,不可自定义
* @param {String} id:'aaa' 表的主键
* @return {Object} data:返回存储的数据,数据格式以存储的为准
*/
translateUtil.getTranslationFromIndexedDB(tablename, id);
版本记录
0.0.6.20201103
- ncu
0.0.5.20201023
- ncu
0.0.4.20200925
- modify readme
0.0.3.20200918
- database version update
0.0.2.20200917
- add session table
0.0.1.20200914
- init project