静态网页如何国际化

test.html

<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8" /> <title>i18next Static</title> </head> <body> <!-- 静态 DOM --> <h1 />

{ "title": "欢迎使用", "desc": "WebStorm + i18next 静态页面示例", "submit": "提交", "hello": "你好,{{name}}" }

之后用webstorm的浏览器打开test.html

运行效果图如下