V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
justin2018
V2EX  ›  问与答

可以把文件中的 xx 语(比如中文)转换成英文,有这样的工具嘛?

  •  
  •   justin2018 · 2023-01-12 19:11:34 +08:00 · 449 次点击
    这是一个创建于 460 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如:

    xxx 文件转换前

    /**
     * 从 chrome 的本地存储区域检索对象
     * @param {string} key 
     */
    const getObjectFromLocalStorage = async function(key) {
      return new Promise((resolve, reject) => {
        try {
          chrome.storage.local.get(key, function(value) {
            resolve(value[key]);
          });
        } catch (ex) {
          reject(ex);
        }
      });
    };
    
    

    xxx 文件转换后

    /**
     * Retrieve object from Chrome's Local StorageArea
     * @param {string} key 
     */
    const getObjectFromLocalStorage = async function(key) {
      return new Promise((resolve, reject) => {
        try {
          chrome.storage.local.get(key, function(value) {
            resolve(value[key]);
          });
        } catch (ex) {
          reject(ex);
        }
      });
    };
    
    
    3 条回复    2023-01-13 13:52:52 +08:00
    azui999
        1
    azui999  
       2023-01-13 10:15:00 +08:00
    自己写个,翻译可以用百度 api
    iPc666
        2
    iPc666  
       2023-01-13 13:46:22 +08:00
    iPc666
        3
    iPc666  
       2023-01-13 13:52:52 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3389 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:14 · PVG 20:14 · LAX 05:14 · JFK 08:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.