diff --git a/LICENSE b/LICENSE index 2071b23..912a7cf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) +Copyright (c) 2024 HeroUnion.website Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/i18n/README.md b/i18n/README.md new file mode 100644 index 0000000..114bd20 --- /dev/null +++ b/i18n/README.md @@ -0,0 +1,33 @@ + +# i18n 多语言辅助工具 + +脚本入口:translate.mjs,模板文件放在public/目录下方便调试,根据模板和多语言json配置文件生成的html文件也放在public/目录下, +并以语言代号为子目录。 + +多语言配置文件以json格式保存在当前目录下, +文件名格式为:语言代号.json + + +国际语言代号参考: + +* https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes +* https://www.andiamo.co.uk/resources/iso-language-codes/ + + +其中: + +* zh - 简体中文 +* zh-cn - 简体中文 +* zh-tw - 台湾繁体中文 +* zh-hk - 香港繁体中文 +* zh-sg - 新加坡繁体中文 + + +## 翻译命令 + + +``` +node translate.mjs [语言代号] +``` + +如果不传参数“语言代号”,则翻译i18n/目录下的所有以配置的语言。