yassinedoghri / astro-i18next

An astro integration of i18next + some utility components to help you translate your astro websites!
https://astro-i18next.yassinedoghri.com
MIT License
521 stars 37 forks source link

Error with npx astro-i18n generate #195

Open Andrej492 opened 7 months ago

Andrej492 commented 7 months ago

package.json file : { "name": "proud-plasma", "type": "module", "version": "0.0.1", "scripts": { "dev": "astro dev", "start": "astro dev", "build": "astro check && astro build", "preview": "astro preview", "astro": "astro", "i18n": "npx astro-i18next generate" }, "dependencies": { "@astrojs/check": "^0.5.10", "@astrojs/mdx": "^2.2.2", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.2", "@astrojs/tailwind": "^5.1.0", "@astrolicious/i18n": "^0.1.2", "astro": "^4.5.10", "astro-i18next": "^1.0.0-beta.21", "tailwindcss": "^3.4.3", "typescript": "^5.4.3" }, "devDependencies": { "prettier-plugin-astro": "^0.13.0" } } ;

astro-i18next.config.mjs file: /** @type {import('astro-i18next').AstroI18nextConfig} */ export default { defaultLocale: "sl", locales: ["sl", "en"], };

index.astro file:

`

import BaseHead from '../components/BaseHead.astro' import Header from '../components/Header.astro' import Footer from '../components/Footer.astro' import { SITE_TITLE, SITE_DESCRIPTION } from '../consts' import i18next, { t } from 'i18next'


<!doctype html>

{t("landingPage.specialization")}