i18n-extractor

2019-10-10 admin

i18n-extractor是什么

什么是i18n-extractor,Extracts calls of the form i18n("literal string") from Javascript code.

i18n-extractor使用教程帮助文档

i18n-extractor

This is a module/command line application to parse Javascript and search for nodes of the form i18n('literal string'), printing out all such strings it finds. (The function name can be customized.)

It allows multiple arguments to the magic function, but it only cares about the first one. Zero arguments is too few.

Install

npm install i18n-extractor

Usage

$ i18n-extract file.js
{"":["translate me","keep translating me"]}

et cetera

If there’s something you want, then do it and send me a pull request (please).

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-77006.html

文章标题:i18n-extractor

回到顶部