Giter VIP home page Giter VIP logo

next-i18next-static-site's People

Contributors

xairoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

danielmendezm

next-i18next-static-site's Issues

How to integrate with the new layout?

Hello, thanks for creating this package!

I wonder how I should integrate this with the new layout.js that replaced the _app.js file.

Also, it's possible to translate the contents of the metadata too?

Can you point me the directions?

The default layout.js:

import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
  title: 'Create Next App',
  description: 'Generated by create next app',
}

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body className={inter.className}>{children}</body>
    </html>
  )
}

Thank you!

App is stuck in infinite loop

Hello and thanks for this package

I don't know why but looking at the network tab of the devtools, my app is stuck in infinite loop, requesting default locale json too many times at homepage.

Do you have any ideas what I did wrong ?

Install and package requirement

While trying our your lib, I am wondering if I need to install the following packages:

  • i18next
  • react-i18next

Do I need to add these to my project?

Thanks for the clarification ๐Ÿ™Œ

nextjs config env is not working

Putting environmental variables in nextjs config is not working, it only works using .env.local file
next.config.js example:

env: {
  NEXT_PUBLIC_I18N_LANGUAGES: '["en", "de"]',
  NEXT_PUBLIC_I18N_DEFAULT_LANGUAGE: "en",
  NEXT_PUBLIC_I18N_NAMESPACES: '["common", "meta", "error"]',
  NEXT_PUBLIC_I18N_DEFAULT_NAMESPACE: "common",
},

This will throw

> next dev

  โ–ฒ Next.js 13.5.6
  - Local:        http://localhost:3000

 โœ“ Ready in 4.1s
 โœ“ Compiled /[lang] in 807ms (397 modules)
Error: NEXT_PUBLIC_I18N_LANGUAGES not set
    at Object.<anonymous> (/Users/lunafreya/Programming/WebstormProjects/personal-portfolio/node_modules/next-i18next-static-site/dist/index.js:82:11)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)

only works in .env.local file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.