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

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

  •  
  •   justin2018 · 2023 年 1 月 12 日 · 740 次点击
    这是一个创建于 1181 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如:

    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 年 1 月 13 日
    自己写个,翻译可以用百度 api
    iPc666
        2
    iPc666  
       2023 年 1 月 13 日
    iPc666
        3
    iPc666  
       2023 年 1 月 13 日
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5549 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 07:51 · PVG 15:51 · LAX 00:51 · JFK 03:51
    ♥ Do have faith in what you're doing.