justin2018
V2EX  ›  问与答

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

  •  
  •   justin2018 · Jan 12, 2023 · 807 views
    This topic created in 1217 days ago, the information mentioned may be changed or developed.

    比如:

    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 replies    2023-01-13 13:52:52 +08:00
    azui999
        1
    azui999  
       Jan 13, 2023
    自己写个,翻译可以用百度 api
    iPc666
        2
    iPc666  
       Jan 13, 2023
    iPc666
        3
    iPc666  
       Jan 13, 2023
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2580 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 16:10 · PVG 00:10 · LAX 09:10 · JFK 12:10
    ♥ Do have faith in what you're doing.