HTMLファイルを迅速に処理してテキストコンテンツを抽出し、標準化された国際化JSONリソースファイルを生成し、多言語ウェブサイト開発を効率化します。
<div class="header">
<h1>Welcome</h1>
<p>Sample text</p>
<button>Start</button>
</div>{
"header.title": "Welcome",
"header.description": "Sample text",
"header.button": "Start"
}2つの強力なフロー:HTMLからテキストをJSONに抽出するフローと、キー付きテンプレートとJSONを使用して元のHTMLを復元するフロー
強力なHTML解析機能により、様々なタグから正確にテキストコンテンツを識別・抽出し、スクリプトやスタイルコードを自動的にフィルタリングします
キーと値のマッピングとネスト構造を持つi18n標準のJSONリソースファイルを自動生成し、直接統合可能
翻訳JSONとt(...)キー付きHTMLを提供し、テンプレートを変更することなく元のHTMLを再構築してテキストを復元します
当社のツールがHTMLコンテンツを構造化された国際化リソースに変換する方法を体験してください
<div class="header">
<h1>Welcome to our service</h1>
<p>This is a sample text to demonstrate i18n extraction.</p>
<button title="Click to continue">Get Started</button>
</div>{
"header.title": "Welcome to our service",
"header.description": "This is a sample text to demonstrate i18n extraction.",
"header.button.text": "Get Started",
"header.button.title": "Click to continue"
}抽出後、人気のあるi18nライブラリとJSONファイルを簡単に統合できます:
// React + i18next (example)
import i18n from 'i18next'
import { useTranslation } from 'react-i18next'
import translations from './translations.json'
i18n.init({ resources: { en: { translation: translations } } })
function Header() {
const { t } = useTranslation()
return (
<div className="header">
<h1>{t('header.title')}</h1>
<p>{t('header.description')}</p>
<button title={t('header.button.title')}>{t('header.button.text')}</button>
</div>
)
}