with npx @docusaurus/init@latest init website classic
i18n: {
defaultLocale: 'en',
locales: ['en', 'it'],
localeConfigs: {
en: {
label: 'English',
},
it: {
label: 'Italiano',
},
},
},
{
type: 'localeDropdown',
position: 'left',
},
yarn run start -- --locale it
import Translate, {translate} from '@docusaurus/Translate';
<main>
<div className={clsx('col col--4', styles.feature)}>
<div className="text--center">
<img className={styles.featureImage} src='img/undraw_docusaurus_mountain.svg' alt="Easy to Use"/>
<h3><Translate description="The homepage message to ask the user to visit my blog">Easy to Use</Translate>
</h3>
<p>
<Translate>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</Translate>
</p>
</div>
</div>
</main>
yarn run write-translations -- --locale it
mkdir -p i18n/it/docusaurus-plugin-content-docs/current
cp -r docs/** i18n/it/docusaurus-plugin-content-docs/current
mkdir -p i18n/it/docusaurus-plugin-content-blog
cp -r blog/** i18n/it/docusaurus-plugin-content-blog