在网上搜了个修改过的zh-CN,把它释放到C:\Program Files\Windows Sidebar\Gadgets\Weather.Gadget文件夹里。

打包文件里有“右键取得管理员权限的文件”的工具。
因为在系统目录下,是没有权限编辑这些文件的,所以需要这个工具来修改,注册列表运行后,右键就有取得管理员权限。

下载附件 解压后得到zh-CN文件夹
替换C:\Program Files\Windows Sidebar\Gadgets\Weather.Gadget\zh-CN即可

请打开zh-CN\js\localizedStrings.js
找到这串代码:

L_localizedStrings_Text['DefaultCity'] = 'Chengdu, CHN'; L_localizedStrings_Text['DefaultLocationCode'] = 'wc:CHXX0052'; L_localizedStrings_Text['DefaultUnit'] = 'Celsius';

把Chengdu,CHN修改成你的地方
把CHXX0052修改成你所在地方的代码

然后打开zh-CN\js\weather.js

找到这串代码:

case ("Shanghai, CHN"): retLocation = "中国-上海"; break; case ("Beijing, CHN"): retLocation = "中国-北京"; break; case ("Changsha, CHN"): retLocation = "中国-长沙"; break; case ("Changchun, CHN"): retLocation = "中国-长春"; break; case ("Changzhou, CHN"): retLocation = "中国-常州"; break; case ("Chengde, CHN"): retLocation = "中国-承德"; break; case ("Chongqing, CHN"): retLocation = "中国-重庆"; break; case ("Chengdu, CHN"): retLocation = "中国-成都"; break; case ("Chifeng, CHN"): retLocation = "中国-赤峰"; break; case ("Dalian, CHN"): retLocation = "中国-大连"; break; case ("Dali, CHN"): retLocation = "中国-大里"; break; case ("Daqing, CHN"): retLocation = "中国-大庆"; break; case ("Datong, CHN"): retLocation = "中国-大同"; break; case ("Foshan, CHN"): retLocation = "中国-佛山"; break; case ("Fushun, CHN"): retLocation = "中国-抚顺"; break; case ("Fuzhou, CHN"): retLocation = "中国-福州"; break; case ("Gaoxiong, CHN"): retLocation = "中国-高雄"; break; case ("Guangzhou, CHN"): retLocation = "中国-广州"; break; case ("Guilin, CHN"): retLocation = "中国-桂林"; break; case ("Guiyang, CHN"): retLocation = "中国-贵阳"; break; case ("Haebin, CHN"): retLocation = "中国-哈尔滨"; break; case ("Haikou, CHN"): retLocation = "中国-海口"; break; case ("Hangzhou, CHN"): retLocation = "中国-杭州"; break; case ("Hefei, CHN"): retLocation = "中国-合肥"; break; case ("Huizhou, CHN"): retLocation = "中国-惠州"; break; case ("Jilin, CHN"): retLocation = "中国-吉林"; break; case ("Jinan, CHN"): retLocation = "中国-济南"; break; case ("Jiujiang, CHN"): retLocation = "中国-九江"; break; case ("Kaifeng, CHN"): retLocation = "中国-开封"; break; case ("Kunming, CHN"): retLocation = "中国-昆明"; break; case ("Lasa, CHN"): retLocation = "中国-拉萨"; break; case ("Leshan, CHN"): retLocation = "中国-乐山"; break; case ("Lanzhou, CHN"): retLocation = "中国-兰州"; break; case ("Luoyang, CHN"): retLocation = "中国-洛阳"; break; case ("Liuzhou, CHN"): retLocation = "中国-柳州"; break; case ("Mianyang, CHN"): retLocation = "中国-绵阳"; break; case ("Mudanjiang, CHN"): retLocation = "中国-牡丹江"; break; case ("Nanchang, CHN"): retLocation = "中国-南昌"; break; case ("Nanjing, CHN"): retLocation = "中国-南京"; break; case ("Nanning, CHN"): retLocation = "中国-南宁"; break; case ("Nantong, CHN"): retLocation = "中国-南通"; break; case ("Panzhihua, CHN"): retLocation = "中国-攀枝花"; break; case ("Qingdao, CHN"): retLocation = "中国-青岛"; break; case ("Quanzhou, CHN"): retLocation = "中国-泉州"; break; case ("Shaoxing, CHN"): retLocation = "中国-绍兴"; break; case ("Shantou, CHN"): retLocation = "中国-汕头"; break; case ("Shenyang, CHN"): retLocation = "中国-沈阳"; break; case ("Shenzhen, CHN"): retLocation = "中国-深圳"; break; case ("Shijiazhuang, CHN"): retLocation = "中国-石家庄"; break; case ("Taiyuan, CHN"): retLocation = "中国-太原"; break; case ("Taibei, CHN"): retLocation = "中国-台北"; break; case ("Taizhong, CHN"): retLocation = "中国-****"; break; case ("Tianjin, CHN"): retLocation = "中国-天津"; break; case ("Wenzhou, CHN"): retLocation = "中国-温州"; break; case ("Wulumuqi, CHN"): retLocation = "中国-乌鲁木齐"; break; case ("Xian, CHN"): retLocation = "中国-西安"; break; case ("Xining, CHN"): retLocation = "中国-西宁"; break; case ("Xiamen, CHN"): retLocation = "中国-厦门"; break; case ("Xianggang, CHN"): retLocation = "中国-香港"; break; case ("Xianyang, CHN"): retLocation = "中国-咸阳"; break; case ("Xinxiang, CHN"): retLocation = "中国-新乡"; break;

任意改一个地名为你的地名即可

最后,把小工具关了,再打开一次。看看,可以了吧

附件是全国地区代码和提取工具,修改好的zh-cn。
[download id="14"]
[download id="15"]

最后修改:2015 年 11 月 06 日
如果觉得我的文章对你有用,请随意赞赏