mini trans:一个愚蠢的简单javascript翻译工具 源码
安装 yarn add mini-trans 使用 import { makeTranslations } from "mini-trans" const translations = { da : { "Hello World" : "Hej Verden" } , de : { "Hello World: " Hallo Welt " } } let t = makeTranslations ( translations , "de" ) t ( "Hello World" ) // Hallo Welt t = makeTranslations ( translations , "da" ) t ( "Hello World" ) // Hej Verden
下载地址
用户评论